OpenVZ Forum


Home » Mailing lists » Devel » [patch 0/3][netns] several fixes/enhancements
[patch 2/3][netns] net: Activate arp for non init netns [message #20645 is a reply to message #20642] Mon, 24 September 2007 12:21 Go to previous messageGo to previous message
Daniel Lezcano is currently offline  Daniel Lezcano
Messages: 417
Registered: June 2006
Senior Member
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Arp is disabled for network namespace different from the init_net.
This patch enables it again.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
 net/ipv4/arp.c |    6 ------
 1 file changed, 6 deletions(-)

Index: linux-2.6-netns/net/ipv4/arp.c
===================================================================
--- linux-2.6-netns.orig/net/ipv4/arp.c
+++ linux-2.6-netns/net/ipv4/arp.c
@@ -939,9 +939,6 @@ static int arp_rcv(struct sk_buff *skb, 
 {
 	struct arphdr *arp;
 
-	if (dev->nd_net != &init_net)
-		goto freeskb;
-
 	/* ARP header, plus 2 device addresses, plus 2 IP addresses.  */
 	if (!pskb_may_pull(skb, (sizeof(struct arphdr) +
 				 (2 * dev->addr_len) +
@@ -1216,9 +1213,6 @@ static int arp_netdev_event(struct notif
 {
 	struct net_device *dev = ptr;
 
-	if (dev->nd_net != &init_net)
-		return NOTIFY_DONE;
-
 	switch (event) {
 	case NETDEV_CHANGEADDR:
 		neigh_changeaddr(&arp_tbl, dev);

-- 
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [patch 0/3][netns] fix and wipeout timewait sockets
Next Topic: [PATCH -mm] task_struct: move ->fpu_counter and ->oomkilladj
Goto Forum:
  


Current Time: Tue Aug 26 11:00:39 GMT 2025

Total time taken to generate the page: 0.13912 seconds