summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-26 10:19:25 +0100
committerDavid S. Miller <davem@davemloft.net>2008-03-26 10:19:25 +0100
commit789e41e6f496022ac1639aaae38ea1943606a9d0 (patch)
tree798425d92de538eab063e1fbfb49f7b29a7fb51c
parent[NETNS][ICMP]: Use per-net sysctls in ipv4/icmp.c. (diff)
downloadlinux-789e41e6f496022ac1639aaae38ea1943606a9d0.tar.xz
linux-789e41e6f496022ac1639aaae38ea1943606a9d0.zip
[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/icmp.c4
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)
{
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;
@@ -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).