OSPFv3 and stub interfaces without lladdr
Christian Tacke
Christian.Tacke+bird.network.cz at cosmokey.com
Thu Jun 4 23:49:53 CEST 2015
Hi,
On Tue, Jun 02, 2015 at 11:23:56 +0200, Ondrej Zajicek wrote:
[...]
> Proper solution would be like:
[...]
> 4) It is likely that there are code in OSPF assuming ospf_iface->addr
> is non-NULL, this should be fixed
[...]
I have tried to look into this. Went through all uses of
ospf_iface->addr and considered them. Most are fine. Here's
a list of the most interesting places:
ospf/iface.c:ospf_sk_open()
sk->saddr = ifa->addr->ip;
ospf_sk_open is hopefully only called on non-stub
interfaces...
ospf/iface.c:ospf_iface_classify()
This one might be called with a NULL, maybe.
ospf/iface.c:ospf_iface_stubby()
same
ospf/packet.c:ospf_rx_hook()
src_local = ipa_in_net(sk->faddr, ifa->addr->prefix, ifa->addr->pxlen);
dst_local = ipa_equal(sk->laddr, ifa->addr->ip);
...
if (ifa->cf->real_bcast && ipa_equal(sk->faddr, ifa->addr->ip))
that code should only be called on active links, really
ospf/hello.c:ospf_send_hello()
/* If there is no other target, we also send HELLO packet to the other end */
if (ipa_nonzero(ifa->addr->opposite) && !ifa->strictnbma &&
maybe add an "ifa->addr && " in the front here, simply?
But really, understanding most of this code is currently
beyond my time budget. So hopefully my findings are
helpful to somone.
> If you want to make a patch doing this, i would be glad, otherwise i
> would look at this issue in the future.
I think, it would be better, if you look into it in the
future.
Cheers
Christian
--
www.cosmokey.com
More information about the Bird-users
mailing list