summaryrefslogtreecommitdiff
path: root/ospfd/ospf_ti_lfa.c
AgeCommit message (Collapse)Author
2023-08-19ospfd: Delete `q_space->vertex_list` on No Backup PathKeelan10
In scenarios where no backup paths are available, ensure proper memory management by deleting `q_space->vertex_list`. This prevents memory leaks. The ASan leak log for reference: ``` Direct leak of 80 byte(s) in 2 object(s) allocated from: #0 0x7fcf8c70aa37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 #1 0x7fcf8c2a8a45 in qcalloc ../lib/memory.c:105 #2 0x7fcf8c27d0cc in list_new ../lib/linklist.c:49 #3 0x55d6e8385e35 in ospf_spf_init ../ospfd/ospf_spf.c:540 #4 0x55d6e838c30d in ospf_spf_calculate ../ospfd/ospf_spf.c:1736 #5 0x55d6e83933cf in ospf_ti_lfa_generate_q_spaces ../ospfd/ospf_ti_lfa.c:673 #6 0x55d6e8394214 in ospf_ti_lfa_generate_p_space ../ospfd/ospf_ti_lfa.c:812 #7 0x55d6e8394c63 in ospf_ti_lfa_generate_p_spaces ../ospfd/ospf_ti_lfa.c:923 #8 0x55d6e8396390 in ospf_ti_lfa_compute ../ospfd/ospf_ti_lfa.c:1101 #9 0x55d6e838ca48 in ospf_spf_calculate_area ../ospfd/ospf_spf.c:1811 #10 0x55d6e838cd73 in ospf_spf_calculate_areas ../ospfd/ospf_spf.c:1840 #11 0x55d6e838cfb0 in ospf_spf_calculate_schedule_worker ../ospfd/ospf_spf.c:1871 #12 0x7fcf8c3922e4 in event_call ../lib/event.c:1979 #13 0x7fcf8c27c828 in frr_run ../lib/libfrr.c:1213 #14 0x55d6e82eeb6d in main ../ospfd/ospf_main.c:249 #15 0x7fcf8bd59d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 ``` Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
2023-08-07ospfd: Ensure listnode returns are usableDonald Sharp
Coverity is complaining that listnode can return a NULL value and thus FRR could derefence the returned value. Since this is not crashing we know that this is not happening in the wild. Let's make this an assert or check that it is legal to use the value. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-05-12ospf_ti_lfa: Free p_space memory allocationKeelan10
Free p_space Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
2023-03-17ospfd: Free up q_space in early return pathDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-17ospfd: Fix ospf_ti_lfa drop of an entire tableDonald Sharp
The new_rtrs variable was just generated and then dropped. Let's fix that entirely Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-17Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp
*: convert to SPDX License identifiers
2023-02-13lib,zebra,bgpd,staticd: use label code to store VNI infoStephen Worley
Use the already existing mpls label code to store VNI info for vxlan. VNI's are defined as labels just like mpls, we should be using the same code for both. This patch is the first part of that. Next we will need to abstract the label code to not be so mpls specific. Currently in this, we are just treating VXLAN as a label type and storing it that way. Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-06-02ospfd: add all_rtrs route table when opaque enabledChristian Hopps
The reachable router table is used by OSPF opaque clients in order to determine if the router advertising the opaque LSA data is reachable (i.e., 2-way conectivity check). Signed-off-by: Christian Hopps <chopps@labn.net>
2021-07-01*: Replace IPV4_MAX_PREFIXLEN to IPV4_MAX_BITLENDonatas Abraitis
Just drop IPV4_MAX_PREFIXLEN at all, no need keeping both. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-17*: require semicolon after DEFINE_<typesafe...>David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-01-19ospfd: Minor memory fixesGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: Add 'debug ospf ti-lfa' commandGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: Add support for non-adjacent TI-LFA P/Q spacesGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: TI-LFA backup path enhancementsGalaxyGorilla
Use a pre-built backup path from the post-convergence SPF tree to make the overall calculation deterministic. This is also a requirement for non-adjacent P/Q spaces since it's way easier to organize multiple P and Q spaces using a 'fixed' backup path. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: enhance TI-LFA memory managementGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: Add support for TI-LFA node protectionGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: Make use of adjacency SIDs in TI-LFAGalaxyGorilla
When P and Q spaces are adjacent then it makes sense to use adjacency SIDs to from the P node to the Q node. There are some other corner cases where this makes also sense like when a P/Q node adjacent to root node. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: Add support for reverse SPF (P2P only)GalaxyGorilla
A reverse SPF is important in the context of TI-LFA, e.g. for computing so called Q spaces. In case the weights of the links are symmetric there is no difference to the 'normal' SPF and hence this patch is really just needed for the case with asymmetric link weights. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: TI-LFA basic infrastructure and algorithmsGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>