diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-09 11:27:31 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-09 11:27:31 +0000 |
commit | b29c620f90d429b868038984a5427470f00aebac (patch) | |
tree | 434ab20cff21348474dd444499a1844606f9c252 /proto/ospf/neighbor.c | |
parent | 279a3b76d193944431a992a1ac43543fe15ab903 (diff) |
Another bugfix in neighbor state machine.
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r-- | proto/ospf/neighbor.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 317da36d..466c7ad5 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); |