SOURCES: kern-2.4.22-proc_arp_send-v2.patch (NEW) - added from htt...

dzeus dzeus at pld-linux.org
Mon Jan 16 22:55:30 CET 2006


Author: dzeus                        Date: Mon Jan 16 21:55:30 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added from http://www.swiecki.net/project.html

---- Files affected:
SOURCES:
   kern-2.4.22-proc_arp_send-v2.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/kern-2.4.22-proc_arp_send-v2.patch
diff -u /dev/null SOURCES/kern-2.4.22-proc_arp_send-v2.patch:1.1
--- /dev/null	Mon Jan 16 22:55:30 2006
+++ SOURCES/kern-2.4.22-proc_arp_send-v2.patch	Mon Jan 16 22:55:25 2006
@@ -0,0 +1,109 @@
+diff -Nur linux-2.4.22.orig/include/linux/sysctl.h linux-2.4.22/include/linux/sysctl.h
+--- linux-2.4.22.orig/include/linux/sysctl.h	Mon Aug 25 13:44:44 2003
++++ linux-2.4.22/include/linux/sysctl.h	Sat Oct 25 03:52:51 2003
+@@ -401,10 +401,11 @@
+ 	NET_NEIGH_ANYCAST_DELAY=10,
+ 	NET_NEIGH_PROXY_DELAY=11,
+ 	NET_NEIGH_LOCKTIME=12,
+-	NET_NEIGH_GC_INTERVAL=13,
+-	NET_NEIGH_GC_THRESH1=14,
+-	NET_NEIGH_GC_THRESH2=15,
+-	NET_NEIGH_GC_THRESH3=16
++	NET_NEIGH_SEND_ARP_REQ=13,
++	NET_NEIGH_GC_INTERVAL=14,
++	NET_NEIGH_GC_THRESH1=15,
++	NET_NEIGH_GC_THRESH2=16,
++	NET_NEIGH_GC_THRESH3=17
+ };
+ 
+ /* /proc/sys/net/ipx */
+diff -Nur linux-2.4.22.orig/include/net/neighbour.h linux-2.4.22/include/net/neighbour.h
+--- linux-2.4.22.orig/include/net/neighbour.h	Thu Nov 22 20:47:11 2001
++++ linux-2.4.22/include/net/neighbour.h	Sat Oct 25 03:43:54 2003
+@@ -74,6 +74,7 @@
+ 	int	proxy_delay;
+ 	int	proxy_qlen;
+ 	int	locktime;
++	int	arp_requests;
+ };
+ 
+ struct neigh_statistics
+diff -Nur linux-2.4.22.orig/net/core/neighbour.c linux-2.4.22/net/core/neighbour.c
+--- linux-2.4.22.orig/net/core/neighbour.c	Mon Aug 25 13:44:44 2003
++++ linux-2.4.22/net/core/neighbour.c	Sat Oct 25 03:53:16 2003
+@@ -775,6 +775,11 @@
+ 	if (arp && (old&(NUD_NOARP|NUD_PERMANENT)))
+ 		goto out;
+ 
++	if(!(neigh->parms->arp_requests) && (!(new & NUD_PERMANENT))) {
++		new &= ~NUD_REACHABLE;
++		new &= ~NUD_VALID;
++	}
++
+ 	if (!(new&NUD_VALID)) {
+ 		neigh_del_timer(neigh);
+ 		if (old&NUD_CONNECTED)
+@@ -1434,7 +1439,7 @@
+ struct neigh_sysctl_table
+ {
+ 	struct ctl_table_header *sysctl_header;
+-	ctl_table neigh_vars[17];
++	ctl_table neigh_vars[18];
+ 	ctl_table neigh_dev[2];
+ 	ctl_table neigh_neigh_dir[2];
+ 	ctl_table neigh_proto_dir[2];
+@@ -1477,6 +1482,9 @@
+ 	{NET_NEIGH_LOCKTIME, "locktime",
+          NULL, sizeof(int), 0644, NULL,
+          &proc_dointvec},
++	{NET_NEIGH_SEND_ARP_REQ, "send_arp_req",
++	 NULL, sizeof(int), 0644, NULL,
++	 &proc_dointvec},
+ 	{NET_NEIGH_GC_INTERVAL, "gc_interval",
+          NULL, sizeof(int), 0644, NULL,
+          &proc_dointvec_jiffies},
+@@ -1518,15 +1526,16 @@
+ 	t->neigh_vars[9].data = &p->anycast_delay;
+ 	t->neigh_vars[10].data = &p->proxy_delay;
+ 	t->neigh_vars[11].data = &p->locktime;
++	t->neigh_vars[12].data = &p->arp_requests;
+ 	if (dev) {
+ 		t->neigh_dev[0].procname = dev->name;
+ 		t->neigh_dev[0].ctl_name = dev->ifindex;
+-		memset(&t->neigh_vars[12], 0, sizeof(ctl_table));
++		memset(&t->neigh_vars[13], 0, sizeof(ctl_table));
+ 	} else {
+-		t->neigh_vars[12].data = (int*)(p+1);
+-		t->neigh_vars[13].data = (int*)(p+1) + 1;
+-		t->neigh_vars[14].data = (int*)(p+1) + 2;
+-		t->neigh_vars[15].data = (int*)(p+1) + 3;
++		t->neigh_vars[13].data = (int*)(p+1);
++		t->neigh_vars[14].data = (int*)(p+1) + 1;
++		t->neigh_vars[15].data = (int*)(p+1) + 2;
++		t->neigh_vars[16].data = (int*)(p+1) + 3;
+ 	}
+ 	t->neigh_neigh_dir[0].ctl_name = pdev_id;
+ 
+diff -Nur linux-2.4.22.orig/net/ipv4/arp.c linux-2.4.22/net/ipv4/arp.c
+--- linux-2.4.22.orig/net/ipv4/arp.c	Mon Aug 25 13:44:44 2003
++++ linux-2.4.22/net/ipv4/arp.c	Sat Oct 25 03:47:40 2003
+@@ -184,6 +184,7 @@
+ 		proxy_delay:		(8 * HZ) / 10,
+ 		proxy_qlen:		64,
+ 		locktime:		1 * HZ,
++		arp_requests:		1,
+ 	},
+ 	gc_interval:	30 * HZ,
+ 	gc_thresh1:	128,
+@@ -340,8 +341,9 @@
+ 		return;
+ 	}
+ 
+-	arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr,
+-		 dst_ha, dev->dev_addr, NULL);
++	if (neigh->parms->arp_requests)
++		arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr,
++			 dst_ha, dev->dev_addr, NULL);
+ 	if (dst_ha)
+ 		read_unlock_bh(&neigh->lock);
+ }
================================================================


More information about the pld-cvs-commit mailing list