diff options
| author | Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org> | 2020-09-29 23:07:40 +0200 |
|---|---|---|
| committer | Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org> | 2020-09-29 23:07:40 +0200 |
| commit | 4c63a76a63fd02ae2aa73e4e66b04b37b10fdd99 (patch) | |
| tree | 391f70440079eff4bc616f2fa69b6db42d9ab912 /ospf6d/ospf6_flood.c | |
| parent | 0ce5baaab1cefb0cd89cd526ab5225cd3a58a921 (diff) | |
ospf6d: Fix flooding of old copies of self-originated LSAs
When receiving old copies (e.g. originated before the local ospf6d was
restarted) of supposedly self-originated LSAs which we previously tried to
flush from the network (by setting them to MaxAge), neither flood them nor
add them to our LSDB. Instead, keep the MaxAge version until we actually
(re-)originate them.
Possible fix for #7030. Testcase in #7168
(tests/topotests/ospf6-dr-no-netlsa-bug7030).
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
| -rw-r--r-- | ospf6d/ospf6_flood.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index b144c6804e..56aac0f21f 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -1001,18 +1001,22 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from, * MAXAGEd and not removed.*/ if (OSPF6_LSA_IS_MAXAGE(old) && !OSPF6_LSA_IS_MAXAGE(new)) { - - if (is_debug) - zlog_debug( - "%s: Current copy of LSA %s is MAXAGE, but new has recent Age.", - old->name, __func__); - - ospf6_lsa_purge(old); if (new->header->adv_router - != from->ospf6_if->area->ospf6->router_id) + != from->ospf6_if->area->ospf6->router_id) { + if (is_debug) + zlog_debug( + "%s: Current copy of LSA %s is MAXAGE, but new has recent age, flooding/installing.", + old->name, __PRETTY_FUNCTION__); + ospf6_lsa_purge(old); ospf6_flood(from, new); - - ospf6_install_lsa(new); + ospf6_install_lsa(new); + } else { + if (is_debug) + zlog_debug( + "%s: Current copy of self-originated LSA %s is MAXAGE, but new has recent age, ignoring new.", + old->name, __PRETTY_FUNCTION__); + ospf6_lsa_delete(new); + } return; } |
