+ switch (skb->protocol) {
+ case __constant_htons(ETH_P_IP):
+ {
-+ struct iphdr *iph = skb->nh.iph;
++ struct iphdr *iph = ip_hdr(skb);
+ info.dst = iph->daddr;
+ info.src = iph->saddr;
+ if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
+ }
+ case __constant_htons(ETH_P_IPV6):
+ {
-+ struct ipv6hdr *iph = skb->nh.ipv6h;
++ struct ipv6hdr *iph = ipv6_hdr(skb);
+ /* Hash ipv6 addresses into a u32. This isn't ideal,
+ * but the code is simple. */
+ info.dst = jhash2(iph->daddr.s6_addr32, 4, q->perturbation);