patch-1.3.42 linux/net/ipv4/af_inet.c

Next file: linux/net/ipv4/arp.c
Previous file: linux/net/ipv4/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.41/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -402,6 +402,7 @@
 	{
 		if(sk->opt)
 			kfree(sk->opt);
+		ip_rt_put(sk->ip_route_cache);
 		/*
 		 *	This one is pure paranoia. I'll take it out
 		 *	later once I know the bug is buried.
@@ -915,6 +916,7 @@
 		sk->daddr = 0;
 		sk->dummy_th.dest = 0;
 	}
+	ip_rt_put(sk->ip_route_cache);
 	sk->ip_route_cache=NULL;
 	return(0);
 }
@@ -1236,6 +1238,9 @@
 		case SIOCDARP:
 		case SIOCGARP:
 		case SIOCSARP:
+		case OLD_SIOCDARP:
+		case OLD_SIOCGARP:
+		case OLD_SIOCSARP:
 			return(arp_ioctl(cmd,(void *) arg));
 		case SIOCDRARP:
 		case SIOCGRARP:
@@ -1569,5 +1574,11 @@
 		S_IFREG | S_IRUGO, 1, 0, 0,
 		0, &proc_net_inode_operations,
 		rt_get_info
+	});
+	proc_net_register(&(struct proc_dir_entry) {
+		PROC_NET_RTCACHE, 8, "rt_cache",
+		S_IFREG | S_IRUGO, 1, 0, 0,
+		0, &proc_net_inode_operations,
+		rt_cache_get_info
 	});
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this