summaryrefslogtreecommitdiff
path: root/proto/ospf/lsupd.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-04-18 01:06:16 +0000
committerOndrej Filip <feela@network.cz>2000-04-18 01:06:16 +0000
commit67315ef64e3655c65cfab032d637fe29d3cf91b2 (patch)
tree95ddb8cb514d5163c4fb5cbf1eb13bf2ab5d7ec3 /proto/ospf/lsupd.c
parent2a0925948de20bd391d2c27a08ffdf2b4350e5c3 (diff)
Some lsack work. There is something very worng. :-( It locked my network.
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 62b6f76a..23e7b1cb 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -122,12 +122,7 @@ flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
if(ifa->type==OSPF_IT_NBMA)
{
- struct ospf_neighbor *nnn;
- WALK_LIST(NODE nnn,ifa->neigh_list)
- {
- if(nnn->state>NEIGHBOR_EXSTART)
- sk_send_to(sk,len, nnn->ip, OSPF_PROTO);
- }
+ sk_send_to_agt(sk ,len, ifa, NEIGHBOR_EXCHANGE);
}
else
{
@@ -267,19 +262,19 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
/* pg 143 (4) */
if((lsatmp.age==LSA_MAXAGE)&&(lsadb==NULL))
{
- struct ospf_neighbor *n=NULL;
- struct ospf_iface *ifa=NULL;
int flag=0;
+ struct ospf_iface *ifatmp;
- WALK_LIST(NODE ifa,po->iface_list)
- WALK_LIST(NODE ntmp,ifa->neigh_list)
+ WALK_LIST(NODE ifatmp,po->iface_list)
+ WALK_LIST(NODE ntmp,ifatmp->neigh_list)
if((ntmp->state==NEIGHBOR_EXCHANGE)&&
(ntmp->state==NEIGHBOR_LOADING))
flag=1;
if(flag==0)
{
- add_ack_list(n,lsa);
+ ospf_lsack_direct_tx(n,lsa);
+
continue;
}
}
@@ -317,7 +312,11 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
lsadb=lsa_install_new(&lsatmp,body, oa);
DBG("New LSA installed in DB\n");
- /* FIXME 144 (5e) ack */
+ if(ifa->state==OSPF_IS_BACKUP)
+ {
+ if(ifa->drid==n->rid) ospf_lsa_delay(n, lsa, p);
+ }
+ else if(ifa->drid==n->rid) ospf_lsa_delay(n, lsa, p);
/* FIXME 145 (5f) self originated? */
continue;
@@ -330,13 +329,25 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
{
struct top_hash_entry *en;
if((en=ospf_hash_find_header(n->lsrth,&lsadb->lsa))!=NULL)
+ {
s_rem_node(SNODE en);
- /* FIXME ack_lsa() */
+ if(ifa->state==OSPF_IS_BACKUP)
+ {
+ if(n->rid==ifa->drid) ospf_lsa_delay(n, lsa, p);
+ }
+ }
+ else
+ {
+ ospf_lsack_direct_tx(n,lsa);
+ }
continue;
}
/* pg145 (8) */
- if((lsadb->lsa.age==LSA_MAXAGE)&&(lsadb->lsa.sn==LSA_MAXSEQNO)) continue;
+ if((lsadb->lsa.age==LSA_MAXAGE)&&(lsadb->lsa.sn==LSA_MAXSEQNO))
+ {
+ continue;
+ }
{
list l;