Setting skb->len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi netfilter list,

This is my first post to this list, so if this question is better handled by a different list, or offtopic, please kindly inform me that is the case. My C is a bit rusty also, so please forgive me if I'm asking something that is not clear. In addition, this is my first netfilter module :-)

In a netfilter module I am working on I alter the packet data such that the length of the packet is reduced by an amount diff. I then set skb->len via the following code:

  skb->len -= diff;

This worked fine with gcc 2.96 but when cross-compiling this module for OpenWrt with gcc 4.1.2 I get the following error:

  error: assignment of read-only member 'len'

Is there a function I can use to set skb->len or do I need to poke around the kernel code and modify this member to be read-write. I accept the fact that what I'm doing is probably a hack, but I would like to get this module working first, then make it well coded second.

Thanks in advance for any advice,

Fred


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux