Inconsistencies with IP_ONESBCAST and/or IP_SENDSRCADDR

Bruce M. Simpson bms at FreeBSD.org
Thu Mar 8 15:57:31 UTC 2007


Bruce M. Simpson wrote:
> I have just committed a change in bms_netdev which enforces strict
> and better defined semantics for the IP_SENDSRCADDR option in 
> udp_output().
>

I have just committed this change in -CURRENT.

After testing it with 'ipbroadcast', it looks good apart from sockets 
which are already laddr bound. This is forbidden by in_pcbbind_setup(). 
The same caveats apply -- it might collide with an already bound inpcb.

It is OK for code to choose any source address configured on the box as 
this will be needed to override source selection come ECMP.

If someone else steps up to make it work when socket is laddr bound, 
well and cool. I now consider it 'fit for purpose'. I'm satisfied with 
this for now.

Regards,
BMS


More information about the freebsd-net mailing list