Mailing List Archive

OSPF problem
Observed on slightly modified quagga-0.96.4.
OSPF does not become DR or BDR on inerface after it is set down and
back up. That is, if there are two OSPF routers in network, I
disable/enable interfaces on both routers, they both claim that the
other one is DR. Have somebody else seen this problem?
There is an entry for nbr_self in oi->nbrs table that is used in
(B)DR elections, this entry is created by the ospf_nbr_add_self call,
removed on InterfaceDown event, but not added back on InterfaceUp.
(at least what I can tell by cscope-ing 0.96.5 sources)
Following patch seems to fix this problem, but I have no idea
what is the preferred correct way of doing it, I just copied some lines
from ospf_network_run into ism_interface_up.

--- ospf_ism.c 16 Jan 2004 10:54:50 -0000
+++ ospf_ism.c 19 May 2004 07:11:17 -0000
@@ -411,6 +411,11 @@ ism_interface_up (struct ospf_interface
/* Otherwise, the state transitions to Waiting. */
next_state = ISM_Waiting;

+ oi->nbr_self->address = *oi->address;
+ oi->nbr_self->router_id = oi->ospf->router_id;
+ oi->nbr_self->src = oi->address->u.prefix4;
+ ospf_nbr_add_self(oi);
+
if (oi->type == OSPF_IFTYPE_NBMA)
ospf_nbr_nbma_if_update (oi->ospf, oi);