Skip to contentSkip to conversation

NF_STOLEN

DISCUSSION 赵磊 2 participants 2 messages Nov 21, 2008 netfilter

lore
Share & tools
lore

赵磊

author
#0 lore raw

Hi,

I register a NF_IP_PRE_ROUTING hook that check the incoming packets. I’m trying to return NF_STOLEN on particular TCP packets and later pass them to the TCP module of the kernel. Any advice about how this can be achieved?

Thanks a lot.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 5 lines · 赵磊

Hi,

I register a NF_IP_PRE_ROUTING hook that check the incoming packets. I’m trying to return NF_STOLEN on particular TCP packets and later pass them to the TCP module of the kernel. Any advice about how this can be achieved?

PREROUTING is invoked from here:

net/ipv4/ip_input.c:
return NF_HOOK(NFPROTO_IPV4, NF_INET_PRE_ROUTING, skb, dev, NULL,
ip_rcv_finish);
or here, net/ipv6/ip6_input.c:
return NF_HOOK(NFPROTO_IPV6, NF_INET_PRE_ROUTING, skb, dev, NULL,
ip6_rcv_finish);
(or whichever other protocol you use)
So you just call the appropriate functions (ip{,6}_rcv_finish). --
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html