summaryrefslogtreecommitdiffstats
path: root/proto/ospf/neighbor.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-03 02:08:48 +0200
committerOndrej Filip <feela@network.cz>2000-05-03 02:08:48 +0200
commit9bc1808a27b35499d2438d731ade6d2cba8aa355 (patch)
tree636991c9b89f962cf06b2a2a80c1c540552a4ad0 /proto/ospf/neighbor.c
parent0bf2f2039e1fc95fe0fa3ee231711212f1f2b128 (diff)
downloadbird-9bc1808a27b35499d2438d731ade6d2cba8aa355.tar
bird-9bc1808a27b35499d2438d731ade6d2cba8aa355.zip
Better rt and net originating.
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r--proto/ospf/neighbor.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index 4a44b6b..050a253 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -25,11 +25,24 @@ neigh_chstate(struct ospf_neighbor *n, u8 state)
if(n->state!=state)
{
ifa=n->ifa;
+ if(n->state==NEIGHBOR_FULL)
+ {
+ ifa->fadj++;
+ n->state=state;
+ originate_rt_lsa(ifa->oa,ifa->oa->po);
+ originate_net_lsa(ifa,ifa->oa->po);
+ }
p=(struct proto *)(ifa->proto);
debug("%s: Neigbor %I changes state from \"%s\" to \"%s\".\n",
p->name, n->rid, ospf_ns[n->state], ospf_ns[state]);
n->state=state;
+ if(state==NEIGHBOR_FULL)
+ {
+ ifa->fadj--;
+ originate_rt_lsa(n->ifa->oa,n->ifa->oa->po);
+ originate_net_lsa(ifa,ifa->oa->po);
+ }
}
}
@@ -236,7 +249,6 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
break;
case INM_LOADDONE:
neigh_chstate(n,NEIGHBOR_FULL);
- originate_rt_lsa(n->ifa->oa,po);
break;
case INM_ADJOK:
switch(n->state)