Reputation: 35
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
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