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@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."