How do you return stolen packets back to Netfilter
Let's say I have intercepted a packet from Netfilter and subsequently returned NF_STOLEN. At some point I want to re-inject that packet back to, in this case, the TCP stream it came fro开发者_如何转开发m. I want to do this from Kernel space. So far I have been unable to find a way to do this. Thanks for the help.
Ok, should have searched a bit longer...
nf_reinject(..) seems to be proper way of handling this.
Can you please explain what really you want to achieve here. Because if you return NF_STOLEN
, that means you have already sent/processed that packet (i.e by calling dev_queue_xmit
). If you have not sent or consumed that packet and want to be processed by kernel later then use NF_QUEUE
and nf_reinject
.
精彩评论