summaryrefslogtreecommitdiffstats
path: root/proto/ospf/neighbor.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-09 13:27:31 +0200
committerOndrej Filip <feela@network.cz>2000-05-09 13:27:31 +0200
commitb29c620f90d429b868038984a5427470f00aebac (patch)
tree434ab20cff21348474dd444499a1844606f9c252 /proto/ospf/neighbor.c
parent279a3b76d193944431a992a1ac43543fe15ab903 (diff)
downloadbird-b29c620f90d429b868038984a5427470f00aebac.tar
bird-b29c620f90d429b868038984a5427470f00aebac.zip
Another bugfix in neighbor state machine.
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r--proto/ospf/neighbor.c10
1 files changed, 3 insertions, 7 deletions
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);