diff options
author | Pooja Jagadeesh Doijode <pdoijode@nvidia.com> | 2023-03-27 19:31:00 +0200 |
---|---|---|
committer | Pooja Jagadeesh Doijode <pdoijode@nvidia.com> | 2023-03-27 23:20:10 +0200 |
commit | 19f451913ed73810e4b02774eae37782c8c36f24 (patch) | |
tree | 6b4fb6d97ca779d23a86e49dd6ab7fbb465a074b /ospfd/ospf_interface.c | |
parent | Merge pull request #12931 from SaiGomathiN/yang (diff) | |
download | frr-19f451913ed73810e4b02774eae37782c8c36f24.tar.xz frr-19f451913ed73810e4b02774eae37782c8c36f24.zip |
ospfd: Fix for vitual-link crash in signal handler
Whenever OSPF virtual-link is created, a virtual interface is
associated with it. Name of the virtual interface is derived by
combining "VLINK" string with the value of vlink_count, which is a global
variable.
Problem:
Consider a scenario where 2 virtual links A and B are created in OSPF with
virtual interfaces VLINK0 and VLINK1 respectively. When virtual-link A is unconfigured
and reconfigured, new interface name derived for it will be VLINK1, which is already
associated with virtual-link B. Due to this, both virtual-links A and B will
point to the same interface, VLINK1.
During FRR restart when signal handler is called, OSPF goes through all the virtual
links and deletes the interface(oi) associated with it. During the deletion of interface
for virtual-link B,it accesses the interface which was deleted already(which was deleted
during deletion of virual-link A) and whose fields were set to NULL. This
leads to OSPF crash.
Fixed it by not decrementing vlink_count during unconfig/deletion for virtual-link.
Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r-- | ospfd/ospf_interface.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index dcecffa6a..649ba70e0 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -977,7 +977,6 @@ static void ospf_vl_if_delete(struct ospf_vl_data *vl_data) if_delete(&ifp); if (!vrf_is_enabled(vrf)) vrf_delete(vrf); - vlink_count--; } /* for a defined area, count the number of configured vl |