From a9c1365872e9554de8f45cd859c57c5192b51a8e Mon Sep 17 00:00:00 2001
From: Marcus Brinkmann <marcus@gnu.org>
Date: Wed, 18 Jul 2001 17:37:13 +0000
Subject: 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>.
---
 pfinet/ChangeLog                    |  7 +++++++
 pfinet/linux-src/net/ipv4/devinet.c | 10 ++++++----
 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;
     }
 
-- 
cgit v1.2.3