How can I add data to a packet before sending it?

Akshay Kawale linux781 at
Sun Apr 3 04:03:19 CEST 2005


I am trying to add data to a packet by expanding the tailroom using

I am using the following statements:
*skb = skb_copy_expand(*skb, 0, 256, GFP_ATOMIC);

I am calling this in the NF_IP_LOCAL_OUT hook, and does not give any
errors if I drop the packet in the NF_IP_POST_ROUTING hook.

However if I don't drop the packet, I get a kernel panic.

I am running Fedora Core 1.
Please let me know how I can achieve this.


- Akshay

More information about the netfilter mailing list