diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-08-27 18:25:46 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-08-27 18:25:46 +0200 |
commit | 061ab802a67cfc336785f6daeecdcbd4910734ed (patch) | |
tree | a3815a619b1e3e553638e4aad6508757e5bc6f7a /proto/ospf/topology.c | |
parent | b49e6f5a65d437cb7e7bdefe8397e0f550496012 (diff) |
Temporary OSPFv3 development commit
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r-- | proto/ospf/topology.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 360e3627..82630104 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -22,6 +22,7 @@ void originate_prefix_rt_lsa(struct ospf_area *oa); void originate_prefix_net_lsa(struct ospf_iface *ifa); +void flush_prefix_net_lsa(struct ospf_iface *ifa); #ifdef OSPFv2 #define ipa_to_rid(x) _I(x) @@ -557,8 +558,6 @@ flush_net_lsa(struct ospf_iface *ifa) ifa->net_lsa->lsa.age = LSA_MAXAGE; lsasum_calculate(&ifa->net_lsa->lsa, ifa->net_lsa->lsa_body); ospf_lsupd_flood(po, NULL, NULL, &ifa->net_lsa->lsa, dom, 0); - - flush_lsa(ifa->net_lsa, po); ifa->net_lsa = NULL; } @@ -1215,6 +1214,28 @@ originate_prefix_net_lsa(struct ospf_iface *ifa) ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1); } +void +flush_prefix_net_lsa(struct ospf_iface *ifa) +{ + struct proto_ospf *po = ifa->oa->po; + struct proto *p = &po->proto; + struct top_hash_entry *en = ifa->pxn_lsa; + u32 dom = ifa->oa->areaid; + + if (en == NULL) + return; + + OSPF_TRACE(D_EVENTS, "Flushing Net Prefix lsa for iface \"%s\".", + ifa->iface->name); + en->lsa.sn += 1; + en->lsa.age = LSA_MAXAGE; + lsasum_calculate(&en->lsa, en->lsa_body); + ospf_lsupd_flood(po, NULL, NULL, &en->lsa, dom, 0); + flush_lsa(en, po); + ifa->pxn_lsa = NULL; +} + + #endif |