Fix a bug where having a process listening to both a INADDR_ANY and a

local address, that was assigned with ifconfig alias and netmask
0xffffffff, would receive duplictae udp packets.
This behaviour can easily be seen by having named run, and using the alias
address as the name server.
This solution is not the pretiest one, but after talk with Garreth, it
is seen as the most easy one.
This commit is contained in:
Guido van Rooij 1996-01-08 20:59:06 +00:00
parent dc3f9062ca
commit 8dd27fd68b

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.c 8.4 (Berkeley) 1/9/95
* $Id: in.c,v 1.19 1995/11/20 12:28:21 phk Exp $
* $Id: in.c,v 1.20 1995/12/09 20:43:52 phk Exp $
*/
#include <sys/param.h>
@ -583,7 +583,13 @@ in_broadcast(in, ifp)
/*
* 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