> Is there any way to inject a newly created packet based on the > captured packet inside a netfilter hook call back function? > My Goal is to capture a packet change compress its tcp payload and > send it. i read ipcomp.c and i used its source. when i change skb size > (like len) and tail pointer kernel hangs. maybe the way to do, is to > create a new packet based on captured packet and ask kernel to send > it. I just don't know how to ask kernel to send a newly created > packet? I've been looking to do something similar, and running into my own questions. First, does your newly created packet completely replace the old, uncompressed packet? Because then you should be able to just issue an ACCEPT verdict to the packet, but pass along new payload data for said packet as part of issuing the verdict. As I said, I've been looking to do something similar (and in fact just joined this list with the hope of getting some answers) -- would you then have to go and change, say, the TCP windows? At the very least it seems you'll need to mangle the returning ACK numbers to the uncompressed value, so the original packet's sender gets the correct acknowledgment. Is there a way to handle this automatically in the Linux kernel? It seems like this would be a valuable thing to implement as part of queue/conntrack if it's not implemented already -- is it? I ask because I will need to implement exactly this functionality if it's not already around. I'm also trying to figure out the best place to put it. Thanks, -- Morgon -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html