Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 1996 21:18:03 +0100 (MET)
From:      guido@gvr.win.tue.nl (Guido van Rooij)
To:        fenner@freefall.freebsd.org (Bill Fenner)
Cc:        CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit:  src/sys/netinet in.c
Message-ID:  <199603172018.VAA21057@gvr.win.tue.nl>
In-Reply-To: <199603151708.JAA12346@freefall.freebsd.org> from "Bill Fenner" at Mar 15, 96 09:08:09 am

next in thread | previous in thread | raw e-mail | index | archive | help
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 <n> duplicate broadcasts
when there were <n-1> aliases on the same subnet as an interfaces' first
ip address. What happens now is that you get one broadcast plus
<n-1> 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



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