Lacking to initialize "IP6CB(skb)->nhoff" for ipv6 transmission ?
From: Eduardo Panisset <hidden>
Date: 2011-03-05 03:59:26
From: Eduardo Panisset <hidden>
Date: 2011-03-05 03:59:26
Hi, Im using iptables for marking outgoing packets and then divert them to specific routing tables. Whenever a flow matches a rule into mangle table it is marked properly and reaches over the function ip6_route_me_harder. That function ends up calling xfrm_decode_session and in particular _decode_session6 for v6 flows. The latter uses "IP6CB(skb)->nhoff" for locating nextheader value but on my debugs it was presenting a weird value (96) instead of the expected (6), since it was a TCP flow. So I made the decision of initializing "IP6CB(skb)->nhoff" (with the value offset(struct ipv6hdr, nexthdr) ) in "ip6_xmit" function and then the (6) started to be shown and the (96) value did not appeared anymore. Is this proceeding correct ? (and then that would be a kernel bug ?) Rgds, Eduardo Panisset.