aboutsummaryrefslogtreecommitdiff
path: root/pfinet/linux-src/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-02-05 12:24:31 +0000
committerRoland McGrath <roland@gnu.org>2000-02-05 12:24:31 +0000
commit9f3e44843d354432de49e01a1c954d556c678e20 (patch)
tree448618f32bbb2be5fbc9b6c999a07d1963649abe /pfinet/linux-src/net/ipv4/devinet.c
parent11282e4f068cacd7d08e61c5372b560f4656df87 (diff)
downloadhurd-9f3e44843d354432de49e01a1c954d556c678e20.tar.gz
hurd-9f3e44843d354432de49e01a1c954d556c678e20.tar.bz2
hurd-9f3e44843d354432de49e01a1c954d556c678e20.zip
Merge Linux_2_2_13 -> Linux_2_2_14 changes
Diffstat (limited to 'pfinet/linux-src/net/ipv4/devinet.c')
-rw-r--r--pfinet/linux-src/net/ipv4/devinet.c11
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 d980631b..ed3d17c2 100644
--- a/pfinet/linux-src/net/ipv4/devinet.c
+++ b/pfinet/linux-src/net/ipv4/devinet.c
@@ -718,7 +718,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
@@ -730,7 +730,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);
}
@@ -983,7 +985,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];
@@ -1023,6 +1025,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}},