patch-2.3.39 linux/net/ipv4/devinet.c
Next file: linux/net/ipv4/icmp.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Sat Jan 8 21:36:20 2000
- Orig file:
v2.3.38/linux/net/ipv4/devinet.c
- Orig date:
Tue Aug 31 17:29:15 1999
diff -u --recursive --new-file v2.3.38/linux/net/ipv4/devinet.c linux/net/ipv4/devinet.c
@@ -1,7 +1,7 @@
/*
* NET3 IP device support routines.
*
- * Version: $Id: devinet.c,v 1.35 1999/08/31 07:03:20 davem Exp $
+ * Version: $Id: devinet.c,v 1.36 2000/01/09 02:19:46 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -730,7 +730,7 @@
read_unlock(&in_dev->lock);
read_unlock(&inetdev_lock);
- if (addr || scope >= RT_SCOPE_LINK)
+ if (addr)
return addr;
/* Not loopback addresses on loopback should be preferred
@@ -745,7 +745,8 @@
read_lock(&in_dev->lock);
for_primary_ifa(in_dev) {
- if (ifa->ifa_scope <= scope) {
+ if (ifa->ifa_scope != RT_SCOPE_LINK &&
+ ifa->ifa_scope <= scope) {
read_unlock(&in_dev->lock);
read_unlock(&inetdev_lock);
read_unlock(&dev_base_lock);
@@ -1001,8 +1002,6 @@
read_unlock(&dev_base_lock);
rt_cache_flush(0);
-
- ip_statistics.IpForwarding = on ? 1 : 2;
}
static
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)