]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/xfrm4_policy.c
[INET]: Consolidate xxx_frag_intern
[linux-2.6-omap-h63xx.git] / net / ipv4 / xfrm4_policy.c
index 98a833ce11142139936c4a2278e083922d024554..329825ca68fe71730387583c9d96129ee3770db2 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;
@@ -306,7 +306,7 @@ static void xfrm4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
 
        xdst = (struct xfrm_dst *)dst;
        if (xdst->u.rt.idev->dev == dev) {
-               struct in_device *loopback_idev = in_dev_get(&loopback_dev);
+               struct in_device *loopback_idev = in_dev_get(init_net.loopback_dev);
                BUG_ON(!loopback_idev);
 
                do {