On Mon, Aug 25, 2008 at 10:44:17AM +0200, Martin Mares wrote:
The second patch causes that 'Invalid broadcast address' error is reported only once for an interface and not during every interface scan.
I wonder: do we need to read the broadcast address set by ifconfig at all? It tends to be unreliable and I have never seen a system where the broadcast address is not set to the last address in the subnet.
If the broadcast address set using ifconfig is misconfigured, the canonical one (last address in the subnet) still works? BTW, what is the reason for this (from netlink.c:380): if (i->ifa_prefixlen == BITS_PER_IP_ADDRESS - 2) ifa.opposite = ipa_opposite(ifa.ip); ? AFAIK /30 mask does not need special handling. - Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@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."
Hello!
If the broadcast address set using ifconfig is misconfigured, the canonical one (last address in the subnet) still works?
Yes, it should (see fib_add_ifaddr() in kernel ipv4/fib_frontend.c).
BTW, what is the reason for this (from netlink.c:380):
if (i->ifa_prefixlen == BITS_PER_IP_ADDRESS - 2) ifa.opposite = ipa_opposite(ifa.ip);
?
AFAIK /30 mask does not need special handling.
The /30 networks can be considered point-to-point links in some cases, so we maintain the address of the other end in the same way as we do for unnumbered P-t-P networks. I am not aware of any place in BIRD which relies on this (except maybe the reference to `opposite' in proto/ospf/topology.c), but it definitely should not do any harm. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth A sine curve goes off to infinity or at least the end of the blackboard.
participants (2)
-
Martin Mares -
Ondrej Zajicek