From 128060c302747e06a6fc02bd4f08896a5b3018fa Mon Sep 17 00:00:00 2001 From: guido Date: Mon, 8 Jan 1996 20:59:06 +0000 Subject: 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. --- sys/netinet/in.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/netinet/in.c') 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 @@ -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 -- cgit v1.1