diff options
author | Dinesh Dutt <ddutt@cumulusnetworks.com> | 2013-08-24 07:54:50 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2013-11-07 18:15:42 -0800 |
commit | bf986da797e7d2a0aaae313fea626ba433581f03 (patch) | |
tree | 79e852020d1f9eb2be774d3050dcc1ea3a88e73b | |
parent | 8ae454e779d5620576990f4bf5da3a35f913cc4d (diff) | |
download | quagga-bf986da797e7d2a0aaae313fea626ba433581f03.tar.bz2 quagga-bf986da797e7d2a0aaae313fea626ba433581f03.tar.xz |
ospf6d: fix various bugs in installing and flooding LSAs
Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | ospf6d/ospf6_flood.c | 14 | ||||
-rw-r--r-- | ospf6d/ospf6_lsa.c | 9 |
2 files changed, 10 insertions, 13 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 3a9af01d..ba770092 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -122,10 +122,8 @@ ospf6_lsa_originate (struct ospf6_lsa *lsa) ospf6_lsa_header_print (lsa); } - if (old) - ospf6_flood_clear (old); - ospf6_flood (NULL, lsa); ospf6_install_lsa (lsa); + ospf6_flood (NULL, lsa); } void @@ -849,7 +847,11 @@ ospf6_receive_lsa (struct ospf6_neighbor *from, quagga_gettime (QUAGGA_CLK_MONOTONIC, &new->received); if (is_debug) - zlog_debug ("Flood, Install, Possibly acknowledge the received LSA"); + zlog_debug ("Install, Flood, Possibly acknowledge the received LSA"); + + /* Remove older copies of this LSA from retx lists */ + if (old) + ospf6_flood_clear (old); /* (b) immediately flood and (c) remove from all retrans-list */ /* Prevent self-originated LSA to be flooded. this is to make @@ -858,10 +860,6 @@ ospf6_receive_lsa (struct ospf6_neighbor *from, if (new->header->adv_router != from->ospf6_if->area->ospf6->router_id) ospf6_flood (from, new); - /* (c) Remove the current database copy from all neighbors' Link - state retransmission lists. */ - /* XXX, flood_clear ? */ - /* (d), installing lsdb, which may cause routing table calculation (replacing database copy) */ ospf6_install_lsa (new); diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 64f929d9..db14731f 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -636,12 +636,12 @@ ospf6_lsa_expire (struct thread *thread) if (CHECK_FLAG (lsa->flag, OSPF6_LSA_HEADERONLY)) return 0; /* dbexchange will do something ... */ - /* reflood lsa */ - ospf6_flood (NULL, lsa); - /* reinstall lsa */ ospf6_install_lsa (lsa); + /* reflood lsa */ + ospf6_flood (NULL, lsa); + /* schedule maxage remover */ ospf6_maxage_remove (ospf6); @@ -692,9 +692,8 @@ ospf6_lsa_refresh (struct thread *thread) ospf6_lsa_header_print (new); } - ospf6_flood_clear (old); - ospf6_flood (NULL, new); ospf6_install_lsa (new); + ospf6_flood (NULL, new); return 0; } |