提交 789e41e6 编写于 作者: P Pavel Emelyanov 提交者: David S. Miller

[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).

Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b34a95ee
......@@ -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).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册