Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jul 1996 20:06:55 +0200 (MET DST)
From:      guido@gvr.win.tue.nl (Guido van Rooij)
To:        jgreco@brasil.moneng.mei.com (Joe Greco)
Cc:        jcl@pavilion.co.uk, hackers@FreeBSD.org
Subject:   Re: Multiple delivery of UDP and IP aliases
Message-ID:  <199607011806.UAA07690@gvr.win.tue.nl>
In-Reply-To: <199606251544.KAA07793@brasil.moneng.mei.com> from Joe Greco at "Jun 25, 96 10:44:53 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> It's a Legitimate Bug in 2.1R and 2.0.5R (at least), and somebody devised
> a patch.  Check the -hackers list, and if you cannot locate the patch, 
> write to me and I will dredge it up.
> 
> My apologies to whoever fixed it, I can't remember anymore  :-(

I made a fix. However, I believ this was fixed in 2.1R.
In 2.1, an alias has an associated netmask of all-ones. 
In the udp code, a packet to an address is always checked to
be a broadcast address using in_broadcast(). For an all-one
netmask, this succeeds where it should not.
I `fixed' this by adding a check for the all-one netmask in
in_broadcast(). This is fixed in 2.1.
The following patch should fix it on 2.05:

-Guido

--- in.c.orig	Mon Jan  8 21:38:45 1996
+++ in.c	Mon Jan  8 21:40:39 1996
@@ -609,7 +609,13 @@
 		     /*
 		      * Check for old-style (host 0) broadcast.
 		      */
-		     t == ia->ia_subnet || t == ia->ia_net))
+		     t == ia->ia_subnet || t == ia->ia_net) &&
+		     /*
+		      * Check for an all one subnetmask. These
+		      * only exist when an interface gets a secondary
+		      * address.
+		      */
+		     ia->ia_subnetmask != (u_long)0xffffffff)
 			    return 1;
 	return (0);
 #undef ia




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607011806.UAA07690>