diff options
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index a94f52c207a7..11700a4dcd95 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -849,7 +849,7 @@ static void mrtsock_destruct(struct sock *sk) | |||
849 | { | 849 | { |
850 | rtnl_lock(); | 850 | rtnl_lock(); |
851 | if (sk == mroute_socket) { | 851 | if (sk == mroute_socket) { |
852 | IPV4_DEVCONF_ALL(sk->sk_net, MC_FORWARDING)--; | 852 | IPV4_DEVCONF_ALL(sock_net(sk), MC_FORWARDING)--; |
853 | 853 | ||
854 | write_lock_bh(&mrt_lock); | 854 | write_lock_bh(&mrt_lock); |
855 | mroute_socket=NULL; | 855 | mroute_socket=NULL; |
@@ -898,7 +898,7 @@ int ip_mroute_setsockopt(struct sock *sk,int optname,char __user *optval,int opt | |||
898 | mroute_socket=sk; | 898 | mroute_socket=sk; |
899 | write_unlock_bh(&mrt_lock); | 899 | write_unlock_bh(&mrt_lock); |
900 | 900 | ||
901 | IPV4_DEVCONF_ALL(sk->sk_net, MC_FORWARDING)++; | 901 | IPV4_DEVCONF_ALL(sock_net(sk), MC_FORWARDING)++; |
902 | } | 902 | } |
903 | rtnl_unlock(); | 903 | rtnl_unlock(); |
904 | return ret; | 904 | return ret; |
@@ -1089,7 +1089,7 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v | |||
1089 | struct vif_device *v; | 1089 | struct vif_device *v; |
1090 | int ct; | 1090 | int ct; |
1091 | 1091 | ||
1092 | if (dev->nd_net != &init_net) | 1092 | if (dev_net(dev) != &init_net) |
1093 | return NOTIFY_DONE; | 1093 | return NOTIFY_DONE; |
1094 | 1094 | ||
1095 | if (event != NETDEV_UNREGISTER) | 1095 | if (event != NETDEV_UNREGISTER) |
@@ -1283,7 +1283,7 @@ static int ip_mr_forward(struct sk_buff *skb, struct mfc_cache *cache, int local | |||
1283 | if (vif_table[vif].dev != skb->dev) { | 1283 | if (vif_table[vif].dev != skb->dev) { |
1284 | int true_vifi; | 1284 | int true_vifi; |
1285 | 1285 | ||
1286 | if (((struct rtable*)skb->dst)->fl.iif == 0) { | 1286 | if (skb->rtable->fl.iif == 0) { |
1287 | /* It is our own packet, looped back. | 1287 | /* It is our own packet, looped back. |
1288 | Very complicated situation... | 1288 | Very complicated situation... |
1289 | 1289 | ||
@@ -1357,7 +1357,7 @@ dont_forward: | |||
1357 | int ip_mr_input(struct sk_buff *skb) | 1357 | int ip_mr_input(struct sk_buff *skb) |
1358 | { | 1358 | { |
1359 | struct mfc_cache *cache; | 1359 | struct mfc_cache *cache; |
1360 | int local = ((struct rtable*)skb->dst)->rt_flags&RTCF_LOCAL; | 1360 | int local = skb->rtable->rt_flags&RTCF_LOCAL; |
1361 | 1361 | ||
1362 | /* Packet is looped back after forward, it should not be | 1362 | /* Packet is looped back after forward, it should not be |
1363 | forwarded second time, but still can be delivered locally. | 1363 | 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) | |||
1594 | { | 1594 | { |
1595 | int err; | 1595 | int err; |
1596 | struct mfc_cache *cache; | 1596 | struct mfc_cache *cache; |
1597 | struct rtable *rt = (struct rtable*)skb->dst; | 1597 | struct rtable *rt = skb->rtable; |
1598 | 1598 | ||
1599 | read_lock(&mrt_lock); | 1599 | read_lock(&mrt_lock); |
1600 | cache = ipmr_cache_find(rt->rt_src, rt->rt_dst); | 1600 | cache = ipmr_cache_find(rt->rt_src, rt->rt_dst); |