diff options
| author | Soman K.S <somanks@gmail.com> | 2021-07-04 17:40:19 +0530 |
|---|---|---|
| committer | Soman K.S <somanks@gmail.com> | 2021-07-08 19:10:29 +0530 |
| commit | 7359e9ba71e3b9cd73ceeb231cf26d40c22dbeb8 (patch) | |
| tree | 0769b97bfe2f6b7ffd8f96cd7f1cfa38d96b6f41 | |
| parent | e49199c387559dbcfacefaafece65da87940b602 (diff) | |
ospf6d : Send LSA update immediately when ospf instance is deleted
Fix: The fix is to call ospf6_write to send the packet immediately to all neighbors
Signed-off-by: kssoman <somanks@gmail.com>
| -rw-r--r-- | ospf6d/ospf6_message.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 817e5372ea..f98bd31fd8 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2356,7 +2356,19 @@ static void ospf6_send_lsupdate(struct ospf6_neighbor *on, } if (oi) { ospf6_packet_add(oi, op); - OSPF6_MESSAGE_WRITE_ON(oi); + /* If ospf instance is being deleted, send the packet + * immediately + */ + if ((oi->area == NULL) || (oi->area->ospf6 == NULL)) + return; + if (oi->area->ospf6->inst_shutdown) { + if (oi->on_write_q == 0) { + listnode_add(oi->area->ospf6->oi_write_q, oi); + oi->on_write_q = 1; + } + thread_execute(master, ospf6_write, oi->area->ospf6, 0); + } else + OSPF6_MESSAGE_WRITE_ON(oi); } } |
