]> git.puffer.fish Git - mirror/frr.git/commit
ospf6d: crash in ospf6_decrement_retrans_count. 10814/head
authorManoj Naragund <mnaragund@vmware.com>
Thu, 17 Mar 2022 11:28:02 +0000 (16:58 +0530)
committerManoj Naragund <mnaragund@vmware.com>
Thu, 17 Mar 2022 11:28:02 +0000 (16:58 +0530)
commit7c20ee06d3deddd6c53fcd5b09c40854c66633ea
tree9a13a326c54eb4495be5325b0b4899cae71617f6
parent30ba0aaa7fe6d58f46cc354dfdfcb88562888df8
ospf6d: crash in ospf6_decrement_retrans_count.

Problem:
ospf6d crash is observed when lsack is received from the neighbour for
AS External LSA.

RCA:
The crash is observed in ospf6_decrement_retrans_count while decrementing
retransmit counter for the LSA when lsack is recived. This is because in
ospf6_flood_interace when new LSA is being added to the neighbour's list
the incrementing is happening on the received LSA instead of the already
present LSA in scope DB which is already carrying counters.

when this new LSA replaces the old one, the already present counters are
not copied on the new LSA this creates counter mismatch which results in
a crash when lsack is recevied due to counter going to negative.

Fix:
The fix involves following changes.
   1. In ospf6_flood_interace when LSA is being added to retrans list
      check if there is alreday lsa in the scoped db and increment
      the counter on that if present.
   2. In ospf6_lsdb_add copy the retrans counter from old to new lsa
      when its being replaced.

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
ospf6d/ospf6_flood.c
ospf6d/ospf6_lsdb.c