summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2001-07-18 17:37:13 +0000
committerMarcus Brinkmann <marcus@gnu.org>2001-07-18 17:37:13 +0000
commita9c1365872e9554de8f45cd859c57c5192b51a8e (patch)
treecb059c2d081851fbf3c87cc6b15595232c2103be
parentde810c391f2ef32edf6106340a274b01b006cdce (diff)
2001-07-18 Marcus Brinkmann <marcus@gnu.org>
* linux-src/net/ipv4/devinit.c (configure_device): Initialize IFA correctly. If we are setting the peer on an IFF_POINTOPOINT link, force the netmask to 255.255.255.255. By Neal H Walfield <neal@cs.uml.edu>.
-rw-r--r--pfinet/ChangeLog7
-rw-r--r--pfinet/linux-src/net/ipv4/devinet.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/pfinet/ChangeLog b/pfinet/ChangeLog
index 0a32afc7..c701197c 100644
--- a/pfinet/ChangeLog
+++ b/pfinet/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-18 Marcus Brinkmann <marcus@gnu.org>
+
+ * linux-src/net/ipv4/devinit.c (configure_device): Initialize IFA
+ correctly. If we are setting the peer on an IFF_POINTOPOINT link,
+ force the netmask to 255.255.255.255.
+ By Neal H Walfield <neal@cs.uml.edu>.
+
2001-07-13 Neal H Walfield <neal@cs.uml.edu>
* options.c (parse_opt): In the cases where we hold global_lock
diff --git a/pfinet/linux-src/net/ipv4/devinet.c b/pfinet/linux-src/net/ipv4/devinet.c
index d107f335..0416ee82 100644
--- a/pfinet/linux-src/net/ipv4/devinet.c
+++ b/pfinet/linux-src/net/ipv4/devinet.c
@@ -419,6 +419,11 @@ configure_device (struct device *dev,
if (!ifa)
return ENOBUFS;
memcpy (ifa->ifa_label, dev->name, IFNAMSIZ);
+
+ ifa->ifa_address = INADDR_NONE;
+ ifa->ifa_mask = INADDR_NONE;
+ ifa->ifa_broadcast = INADDR_NONE;
+ ifa->ifa_local = INADDR_NONE;
}
if (addr != INADDR_NONE)
@@ -435,10 +440,7 @@ configure_device (struct device *dev,
if (peer != INADDR_NONE && (dev->flags & IFF_POINTOPOINT))
{
ifa->ifa_prefixlen = 32;
- if (netmask != INADDR_NONE)
- ifa->ifa_mask = netmask;
- else
- ifa->ifa_mask = inet_make_mask(32);
+ ifa->ifa_mask = inet_make_mask(32);
ifa->ifa_address = peer;
}