From owner-cvs-sys Sun Mar 17 12:18:12 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA02711 for cvs-sys-outgoing; Sun, 17 Mar 1996 12:18:12 -0800 (PST) Received: from gvr.win.tue.nl (root@gvr.win.tue.nl [131.155.210.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA02705 Sun, 17 Mar 1996 12:18:06 -0800 (PST) Received: by gvr.win.tue.nl (8.6.12/1.53) id VAA21057; Sun, 17 Mar 1996 21:18:03 +0100 From: guido@gvr.win.tue.nl (Guido van Rooij) Message-Id: <199603172018.VAA21057@gvr.win.tue.nl> Subject: Re: cvs commit: src/sys/netinet in.c To: fenner@freefall.freebsd.org (Bill Fenner) Date: Sun, 17 Mar 1996 21:18:03 +0100 (MET) Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org In-Reply-To: <199603151708.JAA12346@freefall.freebsd.org> from "Bill Fenner" at Mar 15, 96 09:08:09 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Bill Fenner wrote: > > fenner 96/03/15 09:08:08 > > Modified: sys/netinet in.c > Log: > Allow SIOCGIFBRDADDR and SIOCGIFNETMASK to return information about > aliases, if the alias address was passed in the struct ifreq. > Default to first address on the list, for backwards compatibility. > What happens now when you want to do a broadcast for any ip address on a system? The rpc code would generate duplicate broadcasts when there were aliases on the same subnet as an interfaces' first ip address. What happens now is that you get one broadcast plus directed udp packets to the alias ip itsself. I don't really know a solution. Suppose an interface ed0 has ip address 192.1.1.1 (mask 0xffffff00) and an alias 192.1.1.2. Now the code will return the following broadcast addresses: 192.1.1.0 for the 192.1.1.1 case and 192.1.1.2 for the 192.1.1.2 case I believe that is wrong. But to just make checks like `if the interface has another ip address within the same subnet with a netmask != 0xffffffff then return that other netmask' is a gross hack :-( -Guido