]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/xfrm4_policy.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
[~andy/linux] / net / ipv4 / xfrm4_policy.c
index 98a833ce11142139936c4a2278e083922d024554..4ff8ed30024f3fcf11d83dc1b422d2fc71ecc5a4 100644 (file)
@@ -209,8 +209,8 @@ error:
 static void
 _decode_session4(struct sk_buff *skb, struct flowi *fl)
 {
-       struct iphdr *iph = skb->nh.iph;
-       u8 *xprth = skb->nh.raw + iph->ihl*4;
+       struct iphdr *iph = ip_hdr(skb);
+       u8 *xprth = skb_network_header(skb) + iph->ihl * 4;
 
        memset(fl, 0, sizeof(struct flowi));
        if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) {
@@ -263,7 +263,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
                default:
                        fl->fl_ipsec_spi = 0;
                        break;
-               };
+               }
        }
        fl->proto = iph->protocol;
        fl->fl4_dst = iph->daddr;