user7718036
user7718036

Reputation: 35

nf_ct_get(skb,&ctinfo) function to fetch netfiter conntrack 'struct conn' of IPv6 udp packet

I was using nf_ct_get(skb, &ctinfo) function in net/ipv4/udp.c and net/ipv6/udp.c files to get the conntract reference of udp packets. I noticed that I was able to fetch the 'struct conn' reference of IPV4 udp packet in net/ipv4/udp.c but cannot get reference of 'struct conn' of IPV6 udp in net/ipv6/udp.c. Can you please give some insights on this. For your reference I have put the hook in __udp4_lib_rcv() and __udp6_lib_rcv() functions to get conntrack reference to incoming udp packets.

Upvotes: 0

Views: 453

Answers (1)

kangmj37
kangmj37

Reputation: 89

IPv6 UDP protocol has a INET6_PROTO_FINAL characteristic. therefore, this is final protocol.

Don't need conntrack any more. it may hold conntrack module loaded indefinitely.

Look at net/ipv6/ip6_input.c ip6_input_finish(). nf_reset() is called before __udp6_lib_recv()

Upvotes: 0

Related Questions