zebra: Cleanup early route Q when removing routes.It's possible due to ordering of events that a kernel
route has not been processed yet, yet we have received
a connected route for the same kernel route that needs
to be deleted and as such it is on the early route Q.
Let's write a bit of code that allows us to search the early
Route Q and remove the data.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
*: don't access invalid zapi route msg nexthopsSome zapi route-update handlers were accessing the zapi message
nexthop array without checking that the array contained valid
data. Init locals in those functions, and only access valid
data in the zapi messages.
Signed-off-by: Mark Stapp <mjs@cisco.com>
eigrpd: Handling for malformed update packets-EIGRP daemon was crashing when the code was attempting to read more data from EIGRP update malformed packets than is available in the packets stream.
-Safety checks have been added before reading from the stream to prevent any crashes
-This patch addresses the Update packets carrying routes other than IPv4 Internal routes
Signed-off-by: Ritika Chopra <ritika0313@gmail.com>
bgpd: display reset cause consistently in bgp_show_failed_summary()The peer reset cause is historical and does not have anything to do
with the current peer state. Display it consistently.
Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
doc: Fix a bunch of the duplicate commands during buildSphinx is noticing a bunch of duplicate commands. Let's make it
clear what commands belong to what.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Fix cleanup of ospf_spf make check testThe introduction of 2d0f4603a4a6f6ab3a7406ba0af575548a1c7b46
caused a issue with `make check` as that it did not properly
handle the cleanup since it changed the way cleanup was done.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd: TI-LFA: free tables after useWell, if you leak, go leak big I guess, and leak entire tables at a
time...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospfd: TI-LFA: actually delete vertexes on listRelying on `list_delete()` to free the items doesn't exactly work if the
list doesn't have a `->del` set up.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospfd: TI-LFA: free copied vertex parentThe TI-LFA code calls this and just litters vertex_parent structures.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/zebra: plug memory leaks in `make check`Again as before, the label manager zebra test had some leaks that cause
it to fail `make check` when ASAN is enabled. After this, only the
ospfd tests still fail `make check`, but those are, uh, a bit more
involved to fix.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
isisd: reorder some free() bits, pass `make check`Some cleanup functions in isisd weren't quite aligned with the
allocation parts; move bits around and call them correctly from
`tests/isisd/`. Allows passing `make check` with ASAN enabled for isisd
tests. Other tests still fail `make check`.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/bgpd: plug memory leaks in `make check`Same as before, this plugs a bunch of memory leaks in bgpd tests in
`make check`. Other leaks in `make check` still remain.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/lib: plug memory leaks in `make check`Sprinkle a bunch of ..._free() calls as appropriate. Allows passing
`make check` (for lib/) when ASAN is enabled. Other tests still fail
make check.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests: Ensure key exists for bgp_evpn_mhI am seeing occassional test failures with the
bgp_evpn_mh test where the key doesn't exist. When
I look at the support bundle the key is there. Clearly
a tight timing window is being hit.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: ensure batch clearing flags are clearOnce the clearing iteration has used any 'resume' info, ensure
the appropriate batch flags are cleared.
Signed-off-by: Mark Stapp <mjs@cisco.com>
watchfrr: optarg may be null, guard against itcoverity doesn't know that the i option requires
a valid optarg to be there but it sees the optional
optarg for the OPTION_NETNS and just decides to
do what coverity does. Let's make it happy.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: Check return from VTY_GET_CONTEXTEverywhere else we check the return value for
the call into VTY_GET_CONTEXT. Let's continue
that silliness.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
mgmtd: Remove dead codeThe SIGHUP handler has dead code that will never be reached.
It's been this way for more than a few years already. Let's
just accept that it's dead.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospf6d: Change ospf6_delete signature to take a double pointerThe ospf6_delete function in both places it is called, immediately
afterwords the ospf6 pointer is set to NULL. Let's modify the
ospf6_delete function to correctly set the pointer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
build: Add warning for address of packed memberCompilers have the ability to tell you when you take a unaligned
address within a packed structure. Let's turn that on.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd: On cleanup, actually free vertexesUpon examining this Indirect leak:
Indirect leak of 160 byte(s) in 4 object(s) allocated from:
#0 0x7fe4f40b83b7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
#1 0x7fe4f3c24c1d in qcalloc lib/memory.c:111
#2 0x7fe4f3c03441 in list_new lib/linklist.c:49
#3 0x564c81d076f9 in ospf_spf_vertex_copy ospfd/ospf_spf.c:335
#4 0x564c81d0bff2 in os...