in.c autoadding prefix route

Brooks Davis brooks at
Thu Nov 11 19:13:15 PST 2004

On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote:
> All,
> I know I have sent this a couple of times before, but never got anywhere. This 
> time I am set to commit!
> The attached patch ( derived from 
> WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic prefix 
> routes.
> Right now you can't have two legs into the same network. If you want to, you 
> must give on of the interfaces a host address only (netmask /32). This way it 
> is not possible to hand over the route if one of the interfaces is 
> "removed" (however this is done in the special case).
> The patch allows to add more than on IPv4 address with the same prefix. In the 
> case that there is a route already, we leave it alone and add the new address 
> without the IFA_ROUTE flag. When we remove an address later on, that has a 
> route associated, we try to find an alternative address to use for the route 
> and hand it over.
> This is required for CARP, but should be helpful for other situations as well.

I have no objections so this change.  Does this help or hurt our quest
to be able to usefully bind to  It would be really nice if we
could eventually do this so we could stop running bpf on 90+% of all
machines just so we could use DHCP.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the freebsd-net mailing list