diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-05 12:21:17 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-05 12:21:17 +0000 |
commit | e5f75e8ece5d1a8d3c17bd0156082caf153d3779 (patch) | |
tree | 316ee48be396f95770ccd5511ea442b83cadca51 /pfinet/linux-src/net/ipv4/devinet.c | |
parent | b39cd08347c72483a4521a55301a0fa147a2a2b1 (diff) | |
download | hurd-e5f75e8ece5d1a8d3c17bd0156082caf153d3779.tar.gz hurd-e5f75e8ece5d1a8d3c17bd0156082caf153d3779.tar.bz2 hurd-e5f75e8ece5d1a8d3c17bd0156082caf153d3779.zip |
Import of Linux 2.2.14 subset (ipv4 stack and related)
Diffstat (limited to 'pfinet/linux-src/net/ipv4/devinet.c')
-rw-r--r-- | pfinet/linux-src/net/ipv4/devinet.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pfinet/linux-src/net/ipv4/devinet.c b/pfinet/linux-src/net/ipv4/devinet.c index a50ee3bd..41b42a52 100644 --- a/pfinet/linux-src/net/ipv4/devinet.c +++ b/pfinet/linux-src/net/ipv4/devinet.c @@ -658,7 +658,7 @@ u32 inet_select_addr(struct device *dev, u32 dst, int scope) addr = ifa->ifa_local; } endfor_ifa(in_dev); - if (addr || scope >= RT_SCOPE_LINK) + if (addr) return addr; /* Not loopback addresses on loopback should be preferred @@ -670,7 +670,9 @@ u32 inet_select_addr(struct device *dev, u32 dst, int scope) continue; for_primary_ifa(in_dev) { - if (ifa->ifa_scope <= scope) + if (!IN_DEV_HIDDEN(in_dev) && + ifa->ifa_scope <= scope && + ifa->ifa_scope != RT_SCOPE_LINK) return ifa->ifa_local; } endfor_ifa(in_dev); } @@ -923,7 +925,7 @@ int devinet_sysctl_forward(ctl_table *ctl, int write, struct file * filp, static struct devinet_sysctl_table { struct ctl_table_header *sysctl_header; - ctl_table devinet_vars[12]; + ctl_table devinet_vars[13]; ctl_table devinet_dev[2]; ctl_table devinet_conf_dir[2]; ctl_table devinet_proto_dir[2]; @@ -963,6 +965,9 @@ static struct devinet_sysctl_table {NET_IPV4_CONF_LOG_MARTIANS, "log_martians", &ipv4_devconf.log_martians, sizeof(int), 0644, NULL, &proc_dointvec}, + {NET_IPV4_CONF_HIDDEN, "hidden", + &ipv4_devconf.hidden, sizeof(int), 0644, NULL, + &proc_dointvec}, {0}}, {{NET_PROTO_CONF_ALL, "all", NULL, 0, 0555, devinet_sysctl.devinet_vars},{0}}, |