Skip to content

Commit

Permalink
[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Mar 26, 2008
1 parent b34a95e commit 789e41e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ static void icmp_echo(struct sk_buff *skb)
{
struct net *net;

net = skb->dst->dev->nd_net;
net = dev_net(skb->dst->dev);
if (!net->ipv4.sysctl_icmp_echo_ignore_all) {
struct icmp_bxm icmp_param;

Expand Down Expand Up @@ -1027,7 +1027,7 @@ int icmp_rcv(struct sk_buff *skb)
if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) {
struct net *net;

net = rt->u.dst.dev->nd_net;
net = dev_net(rt->u.dst.dev);
/*
* RFC 1122: 3.2.2.6 An ICMP_ECHO to broadcast MAY be
* silently ignored (we let user decide with a sysctl).
Expand Down

0 comments on commit 789e41e

Please sign in to comment.