]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/ipv4/ipmr.c
[NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
[mirror_ubuntu-artful-kernel.git] / net / ipv4 / ipmr.c
index a94f52c207a7e4f789e9ddf8dcc50d1475766677..e54bc1364473b0336931f413241fec60655bcced 100644 (file)
@@ -1089,7 +1089,7 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v
        struct vif_device *v;
        int ct;
 
-       if (dev->nd_net != &init_net)
+       if (dev_net(dev) != &init_net)
                return NOTIFY_DONE;
 
        if (event != NETDEV_UNREGISTER)
@@ -1283,7 +1283,7 @@ static int ip_mr_forward(struct sk_buff *skb, struct mfc_cache *cache, int local
        if (vif_table[vif].dev != skb->dev) {
                int true_vifi;
 
-               if (((struct rtable*)skb->dst)->fl.iif == 0) {
+               if (skb->rtable->fl.iif == 0) {
                        /* It is our own packet, looped back.
                           Very complicated situation...
 
@@ -1357,7 +1357,7 @@ dont_forward:
 int ip_mr_input(struct sk_buff *skb)
 {
        struct mfc_cache *cache;
-       int local = ((struct rtable*)skb->dst)->rt_flags&RTCF_LOCAL;
+       int local = skb->rtable->rt_flags&RTCF_LOCAL;
 
        /* Packet is looped back after forward, it should not be
           forwarded second time, but still can be delivered locally.
@@ -1594,7 +1594,7 @@ int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait)
 {
        int err;
        struct mfc_cache *cache;
-       struct rtable *rt = (struct rtable*)skb->dst;
+       struct rtable *rt = skb->rtable;
 
        read_lock(&mrt_lock);
        cache = ipmr_cache_find(rt->rt_src, rt->rt_dst);