OSPF HELLO wrong mask

Ondrej Zajicek santiago at crfreenet.org
Sat May 18 14:43:54 CEST 2013


On Wed, May 15, 2013 at 09:18:10PM +0400, Slawa Olhovchenkov wrote:
> > So this is a problem with multiple IPs on an iface. On BSD, we support
> > just one primary address in OSPF (others are just handled as stubs).
> > Lexicographically smallest address was chosen. Unfortunately the kernel
> > chose a different one as a source address.
> 
> Why lexicographically smallest?
> Why not first from getifaddrs() list?

Well, this is mainly a consequence of the facts that primary address
selection is currently in platform independent code and on Linux
the order of addressess has no real meaning. Therefore it seemed
to be a good idea to make it more deterministic, i.e. independent
on the order in which the addresses appeared.

Perhaps the best idea would be to remove the whole primary address
selection (as it does more harm than good) and replace it by platform
dependent flag that this address is preferred for the interface
(and don't even use this flag on Linux).

We enumerate addresses on BSD using CTL_NET / NET_RT_IFLIST sysctl scan.
Does anyone know whether is a reliable way to determine which one of
returned addresses is the primary one or whether we should just add an
another call of SIOCGIFADDR (as suggested by Alexander V. Chernikov)?
I would guess it is the first one, but i am not sure if that is specified
or just a coincidence.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20130518/7417eef8/attachment-0001.asc>


More information about the Bird-users mailing list