Skip to contentSkip to conversation

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

PATCH Applied Pavel Emelyanov 2 participants 2 messages Mar 26, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Build fix for NET_NS=n case (dev->nd_net is omitted).

I didn't check the kernel build after pulling dev->nd_net access optimization from net-2.6.26 tree :(

Sorry.

---

net/ipv4/icmp.c +2 -2
index 7049b3f..3697e05 100644
@@ -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).