From b29c620f90d429b868038984a5427470f00aebac Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Tue, 9 May 2000 11:27:31 +0000 Subject: Another bugfix in neighbor state machine. --- proto/ospf/neighbor.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'proto/ospf/neighbor.c') diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 317da36..466c7ad 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -29,6 +29,8 @@ neigh_chstate(struct ospf_neighbor *n, u8 state) { ifa=n->ifa; n->state=state; + if(state==2WAY && oldstate<2WAY) ospf_int_sm(n->ifa, ISM_NEICH); + if(state<2WAY && oldstate>=2WAY) ospf_int_sm(n->ifa, ISM_NEICH); if(oldstate==NEIGHBOR_FULL) /* Decrease number of adjacencies */ { ifa->fadj--; @@ -227,7 +229,6 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event) { neigh_chstate(n,NEIGHBOR_EXSTART); } - ospf_int_sm(n->ifa, ISM_NEICH); } break; case INM_NEGDONE: @@ -283,14 +284,9 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event) case INM_LLDOWN: case INM_INACTTIM: neigh_chstate(n,NEIGHBOR_DOWN); - ospf_int_sm(n->ifa, ISM_NEICH); break; case INM_1WAYREC: - if(n->state>=NEIGHBOR_2WAY) - { - neigh_chstate(n,NEIGHBOR_INIT); - ospf_int_sm(n->ifa, ISM_NEICH); - } + neigh_chstate(n,NEIGHBOR_INIT); break; default: die("%s: INM - Unknown event?",p->name); -- cgit v1.2.3