Interface Instance IDs in OSPFv3

Ondrej Zajicek santiago at crfreenet.org
Thu May 10 02:28:53 CEST 2012


On Wed, May 09, 2012 at 06:18:19PM +0200, Benjamin Paterson wrote:
>    I am intrigued by the following bit of code in BIRD 1.3.7
>    proto/ospf/iface.c
>    void
>    ospf_ifa_notify(struct proto *p, unsigned flags, struct ifa *a)
>    {
>    [...]
>    if (flags & IF_CHANGE_UP)
>        {
>          int done0 = 0;
>          struct ospf_area *oa;
>          WALK_LIST(oa, po->area_list)
>          {
>            int iid = 0;
>            struct ospf_iface_patt *ip;
>            while (ip = ospf_iface_patt_find(oa->ac, a->iface, iid))
>            {
>              ospf_iface_new(oa, a, ip);
>              if (ip->instance_id == 0)
>                done0++;
>              iid = ip->instance_id + 1;
>            }
>          }
>    I might be wrong here, but if I understand correctly, the code expects the
>    set of instance IDs configured on each interface to be of the form [| 0, n
>    |].

No, ospf_iface_patt_find() returns the first configured iface pattern
with lowest instance id which is greater or equal to iid argument, so
it would iterate through all relevant iface patterns and initialize
them. If you have just one relevant pattern with iid 5, the first call
would return that and second one (called with iid 6) would return NULL.

>    In addition, I haven't seen any option to manually set Instance IDs.

Oops, it seems that i forgot to add this option, probably in dilemma
whether it should be syntactically a regular option or some part of an
iface pattern key (as it is semantically a part of the key). I will fix
that.

-- 
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/20120510/b3f01c72/attachment-0001.asc>


More information about the Bird-users mailing list