Packet Mangling not taking?

Marc Kurtz mkurtz@dsdlabs.com
Mon, 1 Oct 2001 17:07:15 -0400


Hi all,

	First thanks to S. Lockwood-Childs for answering my question on MAC
addresses. Your help is much appreciated.

	On to my real problem now. I have been trying to test out packet
modification with netfilter hooks (using modules). What I have been doing is
adding 20 bytes at the end of a packet on one system, and then removing the
20 bytes at the other end of a connection on another system. It seems that
when the packet leaves the netfilter hook procedure that the skb->len has
been changed by the appropriate skb_* procedure (so it is coming in and
either adding or subtracting 20 bytes from the length). But when it reaches
the other end, it doesn't see the change in packet length. I think the
subtracting part (associated with the PRE-ROUTING hook, i.e. incoming
traffic) works okay, but the outgoing part (tried both POST_ROUTING and
LOCAL_OUT) doesn't seem to take. Do I need to modify any IP header info? I
tried to "iph->tot_len =htons(skb->len)" but that caused the packet to get
dropped somewhere along the line (do I need to re-checksum? Is there a
function to do this for me?)

I hope someone can give me a handle. (the end result is that we want to be
able to sort-of add meta-data to a packet between two points)


Thank You,
Marc Kurtz
IT Manager
DSD Laboratories, Inc.
978-443-9700