[CFT/R] IPv4 source address selection

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Sun, 24 Aug 2008 11:31:53 +0000 (UTC)
Hi,

I have a patch, that was inspired by work from Y!, to do porper
IPv4 source address selection for unbound sockets (with multi-IP
jails).

You can temporary find it here:
http://people.freebsd.org/~bz/20080823-01-in_pcbladdr.diff

People running my latest jail patches have been ``testing'' this
without really knowing the last weeks.

In case you wonder why, in the jail case, I loop over the ifa first
before simply falling back to the primary jail IP (which is the only
jail IP as in HEAD) -- this is because with the upcoming jail patches
I have to check if any of possibly lots of IPs match any IP on an
interface and only if none matches I have to fall back to the 'primary'
jail IP.
So the code has been prepared for upcoming changes already.


Feel free to test it and report problems or unexpected behavior.
Unless someone is going to cry it'll hit HEAD in a few days.


/bz

PS: in case you review this properly (not only glance at it or test
     it) let me know so I can punish you in the Reviewed by: line;-)

-- 
Bjoern A. Zeeb              Stop bit received. Insert coin for new game.
Received on Sun Aug 24 2008 - 09:51:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:34 UTC