aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index ff9a8e643fcc..f38f093ef751 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -351,7 +351,7 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param,
351 struct sock *sk; 351 struct sock *sk;
352 struct sk_buff *skb; 352 struct sk_buff *skb;
353 353
354 sk = icmp_sk(rt->u.dst.dev->nd_net); 354 sk = icmp_sk(dev_net(rt->u.dst.dev));
355 if (ip_append_data(sk, icmp_glue_bits, icmp_param, 355 if (ip_append_data(sk, icmp_glue_bits, icmp_param,
356 icmp_param->data_len+icmp_param->head_len, 356 icmp_param->data_len+icmp_param->head_len,
357 icmp_param->head_len, 357 icmp_param->head_len,
@@ -382,7 +382,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
382{ 382{
383 struct ipcm_cookie ipc; 383 struct ipcm_cookie ipc;
384 struct rtable *rt = skb->rtable; 384 struct rtable *rt = skb->rtable;
385 struct net *net = rt->u.dst.dev->nd_net; 385 struct net *net = dev_net(rt->u.dst.dev);
386 struct sock *sk = icmp_sk(net); 386 struct sock *sk = icmp_sk(net);
387 struct inet_sock *inet = inet_sk(sk); 387 struct inet_sock *inet = inet_sk(sk);
388 __be32 daddr; 388 __be32 daddr;
@@ -447,7 +447,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
447 447
448 if (!rt) 448 if (!rt)
449 goto out; 449 goto out;
450 net = rt->u.dst.dev->nd_net; 450 net = dev_net(rt->u.dst.dev);
451 sk = icmp_sk(net); 451 sk = icmp_sk(net);
452 452
453 /* 453 /*
@@ -677,7 +677,7 @@ static void icmp_unreach(struct sk_buff *skb)
677 u32 info = 0; 677 u32 info = 0;
678 struct net *net; 678 struct net *net;
679 679
680 net = skb->dst->dev->nd_net; 680 net = dev_net(skb->dst->dev);
681 681
682 /* 682 /*
683 * Incomplete header ? 683 * Incomplete header ?