patch-pre2.0.8 linux/net/ipv4/route.c

Next file: linux/CREDITS
Previous file: linux/net/ipv4/ip_fw.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.7/linux/net/ipv4/route.c linux/net/ipv4/route.c
@@ -604,7 +604,8 @@
 		 *	but less metric. We'll delete it 
 		 *	after instantiation of new route.
 		 */
-		if (f1->fib_info->fib_gateway == gw)
+		if (f1->fib_info->fib_gateway == gw &&
+		    (gw || f1->fib_info->fib_dev == dev))
 			dup_fp = fp;
 		fp = &f1->fib_next;
 	}
@@ -643,7 +644,8 @@
 
 	while ((f1 = *fp) != NULL && f1->fib_dst == dst)
 	{
-		if (f1->fib_info->fib_gateway == gw)
+		if (f1->fib_info->fib_gateway == gw &&
+		    (gw || f1->fib_info->fib_dev == dev))
 		{
 			cli();
 			*fp = f1->fib_next;


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