diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 7049b3f5f3cc..3697e0528317 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -821,7 +821,7 @@ static void icmp_echo(struct sk_buff *skb) | |||
821 | { | 821 | { |
822 | struct net *net; | 822 | struct net *net; |
823 | 823 | ||
824 | net = skb->dst->dev->nd_net; | 824 | net = dev_net(skb->dst->dev); |
825 | if (!net->ipv4.sysctl_icmp_echo_ignore_all) { | 825 | if (!net->ipv4.sysctl_icmp_echo_ignore_all) { |
826 | struct icmp_bxm icmp_param; | 826 | struct icmp_bxm icmp_param; |
827 | 827 | ||
@@ -1027,7 +1027,7 @@ int icmp_rcv(struct sk_buff *skb) | |||
1027 | if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { | 1027 | if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { |
1028 | struct net *net; | 1028 | struct net *net; |
1029 | 1029 | ||
1030 | net = rt->u.dst.dev->nd_net; | 1030 | net = dev_net(rt->u.dst.dev); |
1031 | /* | 1031 | /* |
1032 | * RFC 1122: 3.2.2.6 An ICMP_ECHO to broadcast MAY be | 1032 | * RFC 1122: 3.2.2.6 An ICMP_ECHO to broadcast MAY be |
1033 | * silently ignored (we let user decide with a sysctl). | 1033 | * silently ignored (we let user decide with a sysctl). |