diff options
author | guido <guido@FreeBSD.org> | 1996-01-08 20:59:06 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 1996-01-08 20:59:06 +0000 |
commit | 128060c302747e06a6fc02bd4f08896a5b3018fa (patch) | |
tree | 40681727fa33681ed14513eea46ae158b298d2a5 /sys/netinet/in.c | |
parent | 010b876e8e03d78ced2b27469a3c7ba90d999669 (diff) | |
download | FreeBSD-src-128060c302747e06a6fc02bd4f08896a5b3018fa.zip FreeBSD-src-128060c302747e06a6fc02bd4f08896a5b3018fa.tar.gz |
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.
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r-- | sys/netinet/in.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index c1b2301..84a200d 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -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 |