summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-06-04 16:22:30 +0200
committerOndrej Filip <feela@network.cz>2004-06-04 16:22:30 +0200
commitf9fdabe4f68685e6244e88524b2526958c56e44d (patch)
tree199e3ff969d6fc51c6db5726ce12a87465bb9555 /proto/ospf
parent3df1e80464ce5e6cea1b9a9500d1adbfe59cd564 (diff)
downloadbird-f9fdabe4f68685e6244e88524b2526958c56e44d.tar
bird-f9fdabe4f68685e6244e88524b2526958c56e44d.zip
Small reversing of previous patch.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/lsupd.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 3ec0f10..39a089d 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -439,19 +439,20 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
/* Remove old from all ret lists */
/* pg 144 (5c) */
- WALK_LIST(NODE ift,po->iface_list)
- WALK_LIST(NODE ntmp,ift->neigh_list)
- {
- struct top_hash_entry *en;
- if(ntmp->state>NEIGHBOR_EXSTART)
- if((en=ospf_hash_find_header(ntmp->lsrth,&lsadb->lsa))!=NULL)
- {
- s_rem_node(SNODE en);
- if(en->lsa_body!=NULL) mb_free(en->lsa_body);
- en->lsa_body=NULL;
- ospf_hash_delete(ntmp->lsrth,en);
- }
- }
+ if(lsadb)
+ WALK_LIST(NODE ift,po->iface_list)
+ WALK_LIST(NODE ntmp,ift->neigh_list)
+ {
+ struct top_hash_entry *en;
+ if(ntmp->state>NEIGHBOR_EXSTART)
+ if((en=ospf_hash_find_header(ntmp->lsrth,&lsadb->lsa))!=NULL)
+ {
+ s_rem_node(SNODE en);
+ if(en->lsa_body!=NULL) mb_free(en->lsa_body);
+ en->lsa_body=NULL;
+ ospf_hash_delete(ntmp->lsrth,en);
+ }
+ }
if((lsatmp.age==LSA_MAXAGE)&&(lsatmp.sn==LSA_MAXSEQNO)
&&lsadb&&can_flush_lsa(oa))