Mark Stapp
e03feca82f
Merge pull request #16575 from donaldsharp/doc_address_sanitizer_stuff
...
doc: Add doc to show sysctl setting for Sanitizers
2024-08-13 14:18:40 -04:00
Donald Sharp
90a50fd4af
Merge pull request #16576 from opensourcerouting/fix/free_opaque_data_of_route_entry
...
zebra: Do not forget to free opaque data for route entry
2024-08-13 14:14:36 -04:00
Donald Sharp
68fff49056
babeld: Free up memory on shutdown
...
a) call vector_delete on created vector on shutdown.
b) Call babel_clean_routing_process on shutdown
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-13 14:12:05 -04:00
Donald Sharp
f01205bb96
pbrd: Call vrf_terminate on shutdown
...
Free up vrf memory on shutdown.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-13 14:11:07 -04:00
Donatas Abraitis
1e288c9b55
zebra: Do not forget to free opaque data for route entry
...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-13 18:00:30 +03:00
Donatas Abraitis
b0bb8cbfcf
Merge pull request #16559 from donaldsharp/fix_python_warning
...
tests: Fix bgp_duplicate_nexthop python warning
2024-08-13 16:20:27 +02:00
Donald Sharp
2de9d71a5c
doc: Add doc to show sysctl setting for Sanitizers
...
In order to run the XXXX Sanitizers over the code as a developer
modern linux distro's require a specific sysctl. Let's document
that so that people are aware of it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-13 08:58:29 -04:00
Donald Sharp
ce4e451c5b
bgpd: Free up non-freed json memory on function return
...
json_peers is allocated in the above if statement block
for json but is not freed in this code path. Noticed
by running Address Sanitizer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-13 08:49:01 -04:00
Donald Sharp
847d74a5b0
Merge pull request #16558 from nabahr/pim_doc
...
doc: Fix up pim user docs.
2024-08-13 08:47:27 -04:00
Donatas Abraitis
b4e4fb476a
Merge pull request #16557 from donaldsharp/pathd_shutdown_memory_leaks
...
pathd: Cleanup shutdown memory leaks
2024-08-12 23:45:32 +03:00
Donatas Abraitis
74333790e3
Merge pull request #16555 from donaldsharp/agentx_event_leak
...
lib: Fix memory leak in snmp on shutdown
2024-08-12 23:45:14 +03:00
Nathan Bahr
33ce5d2410
doc: Fix up pim user docs.
...
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-08-12 18:48:02 +00:00
Donald Sharp
1563d9f9c8
tests: Fix bgp_duplicate_nexthop python warning
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-12 13:55:26 -04:00
Donald Sharp
c4fdc837c0
Merge pull request #16534 from opensourcerouting/fix/start_ldpd_if_unified
...
doc: Document on how to start specific daemons with unified config in topotests
2024-08-12 10:25:54 -04:00
Donald Sharp
33af3c0278
pathd: Cleanup shutdown memory leaks
...
Just some code to cleanup the shutdown memory leaks
that are in pathd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-12 10:14:31 -04:00
Donald Sharp
b8b38a593c
lib: Fix memory leak in snmp on shutdown
...
The events list is storing a `struct event *` allocated
as a MTYPE_TMP pointer, on shutdown ensure that it is
properly free'd up.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-12 08:51:19 -04:00
Donatas Abraitis
cc0fdd3b1d
Merge pull request #16439 from louis-6wind/fix-ipv4-mapped-ipv6
...
bgpd: fixes for ipv4 mapped ipv6 address
2024-08-12 15:37:36 +03:00
Donatas Abraitis
4e208087fd
Merge pull request #16545 from mjstapp/fix_isis_threeway
...
isisd: fix memory handling in isis_adj_process_threeway()
2024-08-12 09:39:45 +03:00
Donatas Abraitis
1d5f0a2beb
Merge pull request #16556 from donaldsharp/mgmt_ignore
...
mgmtd: Add to .gitignore for mgmtd_testc program
2024-08-12 09:39:22 +03:00
Donatas Abraitis
8c936d44d0
Merge pull request #16420 from pguibert6WIND/trap_rfc4382
...
bgpd: add bgp snmp traps rfc4382 command
2024-08-12 09:38:58 +03:00
Donatas Abraitis
263eb6d141
Merge pull request #16554 from donaldsharp/zebra_ensure_no_use_after_free
...
zebra: Ensure non-equal id's are not same nhg's
2024-08-12 07:59:42 +03:00
Philippe Guibert
d95f9a35d4
bgpd, doc: add bgp snmp traps rfc4382 command
...
Add a trap command to disable or enable the traps defined by
the RFC4382.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-08-11 19:28:50 +00:00
Donatas Abraitis
4ace11d010
bgpd: Move evpn_overlay to a pointer
...
Before this convertion:
```
/* --- cacheline 3 boundary (192 bytes) --- */
struct bgp_attr_encap_subtlv * encap_subtlvs; /* 192 8 */
struct bgp_attr_encap_subtlv * vnc_subtlvs; /* 200 8 */
struct bgp_route_evpn evpn_overlay; /* 208 36 */
```
After this convertion:
```
/* --- cacheline 3 boundary (192 bytes) --- */
struct bgp_attr_encap_subtlv * encap_subtlvs; /* 192 8 */
struct bgp_attr_encap_subtlv * vnc_subtlvs; /* 200 8 */
struct bgp_route_evpn * evpn_overlay; /* 208 8 */
```
Saving 28 bytes when EVPN is not used.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-11 13:59:13 +03:00
Donatas Abraitis
3901cfea23
doc: Document on how to run specific daemons with unified config in topotests
...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-11 13:47:08 +03:00
Donatas Abraitis
79cbde8095
tests: Convert self.unified_config to boolean
...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-11 13:32:11 +03:00
Donatas Abraitis
423e8076b5
Merge pull request #16542 from donaldsharp/vtysh_stupidly_large
...
lib: Don't print warning if not a daemon
2024-08-11 11:43:46 +03:00
Donald Sharp
0ec96ab525
mgmtd: Add to .gitignore for mgmtd_testc program
...
This program, mgmtd_testc, is built with the
--enable-mgmtd-test-be-client configure option
but it is not .gitignore'd. Let's fix that
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-10 20:21:27 -04:00
Donald Sharp
3875588ece
Merge pull request #16548 from opensourcerouting/fix/reduce_attr_a_bit
...
Shrink a couple bytes of struct attr
2024-08-10 19:51:10 -04:00
Donald Sharp
c79599e497
Merge pull request #16551 from idryzhov/distrib-del
...
lib: fix distribute-list deletion
2024-08-10 19:50:26 -04:00
Donald Sharp
5a1b61aeba
zebra: Ensure non-equal id's are not same nhg's
...
The function zebra_nhg_hash_equal is only used
as a hash function for storage of NHG's and retrieval.
If you have say two nhg's:
31 (25/26)
32 (25/26)
This function would return them as being equal. Which
of course leads to the problem when you attempt to
hash_release 32 but release 31 from the hash. Then later
when you attempt to do hash comparisons 32 has actually
been freed leaving to use after free situations and shit
goes down hill fast.
This hash is only used as part of the hash comparison
function for nexthop group storage. Since this is so
let's always return the 31/32 nhg's are not equal at all.
We possibly have a different problem where we are creating
31 and 32 ( when 31 should have just been used instead of 32 )
but we need to prevent any type of hash release problem at all.
This supercedes any other issue( that should be tracked down
on it's own ). Since you can have use after free situation
that leads to a crash -vs- some possible nexthop group duplication
which is very minor in comparison.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-10 19:49:35 -04:00
Christian Hopps
8cc83201fc
Merge pull request #16529 from idryzhov/fix-load-config
...
mgmtd: don't add implicit state data when reading config from file
2024-08-10 04:10:34 -04:00
Christian Hopps
64ac03c90b
Merge pull request #16511 from oplklum/master
...
Fix LYD_NEW_PATH_OUTPUT issue to support libyang v3.x
2024-08-10 03:46:11 -04:00
Lu.Mao
87c9060f90
lib: Fix LYD_NEW_PATH_OUTPUT issue to support libyang v3.x
...
Fix the LYD_NEW_PATH_OUTPUT undeclared error to support the latest libyang v3.x version,
and also compatible with old version.
Signed-off-by: Lu Mao <lu.mao@molex.com>
2024-08-09 17:32:37 -07:00
Igor Ryzhov
8fad4f317e
lib: fix distribute-list deletion
...
When a whole distribute-list is deleted (can be done only using API),
all its children must be cleaned up manually.
Fixes #16538
Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2024-08-10 01:36:15 +03:00
Donatas Abraitis
5c84cddab8
bgpd: Shrink rmap_change_flags to 2-bytes
...
4 bytes is not needed for this thing clearly.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-09 21:33:50 +03:00
Donatas Abraitis
8b66a236e8
bgpd: Reduce encap_tunneltype to 1 byte
...
It's not used as a bitmask, no point to use it as 2 bytes.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-09 21:33:46 +03:00
Mark Stapp
3eb7d16411
isisd: fix memory handling in isis_adj_process_threeway()
...
The adj_process_threeway() api may call the adj_state_change()
api, which may delete the adj struct being examined. Change the
signature so that callers pass a ptr-to-ptr so that they will
see that deletion.
Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-08-09 10:08:21 -04:00
Donatas Abraitis
927be7a50e
Merge pull request #16539 from donaldsharp/tests_memory_shut
...
Tests memory shut
2024-08-09 13:30:30 +03:00
Donatas Abraitis
536d478049
Merge pull request #16535 from pguibert6WIND/srv6_nexthop_context
...
lib: add seg6localContext json attribute in nexthop information
2024-08-08 22:39:34 +03:00
Donald Sharp
cecf5716d5
lib: Don't print warning if not a daemon
...
vtysh will print out the `stupidly large FD limit` upon
every run of the program if the ulimit is set stupidly
large. Prevent this from being displayed for vtysh.
Fixes : #16516
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 15:26:41 -04:00
Donald Sharp
7b8ca3e2ed
Merge pull request #16531 from idryzhov/fix-rip-show-distrib
...
ripd: fix show run output for distribute-list
2024-08-08 14:28:32 -04:00
Donald Sharp
208c53c90e
isisd, lib: Cleanup linked list associated with snmp
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 14:24:59 -04:00
Donald Sharp
db986aded4
lib: Cleanup memory associated with modules on shutdown
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 14:24:59 -04:00
Donald Sharp
bc16c8ce8d
isisd: Free up isis master list of instances
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 14:24:59 -04:00
Donald Sharp
2e7d915ca2
isisd: Cleanup leaked hash on shut in circuit
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 14:24:59 -04:00
Donald Sharp
b44972b65c
isisd: Free up memory associated with rm/vrf's
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 14:24:59 -04:00
Donald Sharp
5891afb824
sharpd: Eliminate leaked list for locator-chunks
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-08 14:24:59 -04:00
Jafar Al-Gharaibeh
000ad7ff98
Merge pull request #16526 from opensourcerouting/fix/invalid_escape_chars_frr-reload.py
...
tools: Fix python string escape warnings for frr-reload.py
2024-08-08 12:31:48 -04:00
Donald Sharp
e7fd713afc
Merge pull request #16530 from idryzhov/fix-no-distrib-crash
...
lib: fix crash on distribute-list delete
2024-08-08 08:22:18 -04:00
Philippe Guibert
5d027fc791
lib: add seg6localContext json attribute in nexthop information
...
Some srv6 behaviors have a context attached that is visible if
no json is requested:
> # show ipv6 route
> [..]
> B>* 2001:db8:1:1:100::/128 [20/0] is directly connected, vrf10, seg6local End.DT6 table 10, weight 1, 00:00:14
> B>* 2001:db8:1:1:200::/128 [20/0] is directly connected, vrf20, seg6local End.DT6 table 20, weight 1, 00:00:14
>
The json does not dump this attribute:
> # show ipv6 route 2001:db8:1:1:100::/128 json
> [..]
> "nexthops":[
> {
> "flags":3,
> "fib":true,
> "directlyConnected":true,
> "interfaceIndex":6,
> "interfaceName":"vrf10",
> "active":true,
> "weight":1,
> "seg6local":{
> "action":"End.DT6"
> },
> }
>
Add the json support for this.
> "nexthops":[
> {
> "flags":3,
> "fib":true,
> "directlyConnected":true,
> "interfaceIndex":6,
> "interfaceName":"vrf10",
> "active":true,
> "weight":1,
> "seg6local":{
> "action":"End.DT6"
> },
> "seg6localContext":{
> "table":10
> }
> }
>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-08-08 11:36:01 +02:00