Commit Graph

35472 Commits

Author SHA1 Message Date
Donatas Abraitis
b3600d82dc
Merge pull request #15614 from louis-6wind/fix-6pe-address
bgpd: fix ipv4-mapped ipv6 on non 6pe
2024-05-10 22:55:12 +03:00
Christian Hopps
51119823d0
Merge pull request #15976 from opensourcerouting/build-more-xref-setup
build: throw in a few more `XREF_SETUP`
2024-05-10 10:14:44 -04:00
Jafar Al-Gharaibeh
c143a29b6b
Merge pull request #15986 from mjstapp/more_rtas
zebra: add some more netlink RTA_ strings
2024-05-10 01:22:27 -05:00
Mark Stapp
6afb6962be zebra: add some more netlink RTA_ strings
Add a few more RTA_ attribute names to the netlink debug
output.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-05-09 16:56:07 -04:00
Jafar Al-Gharaibeh
6482d1abe6
Merge pull request #15974 from LabNConsulting/chopps/add-notify-diag
mgmtd: add missing diagnostic show cmd output (notify maps)
2024-05-09 12:02:24 -05:00
David Lamparter
d65280a9a8 build: throw in a few more XREF_SETUP
This really should be all of them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-09 18:02:49 +02:00
Jafar Al-Gharaibeh
0c9ce7a862
Merge pull request #15975 from opensourcerouting/pim-fixes-20240508
pimd: fixes split off from #15969
2024-05-09 08:52:11 -05:00
Donald Sharp
5300bccc98
Merge pull request #15977 from LabNConsulting/chopps/key-test-fix
tests: fix mis-spelled `cryptographic-algorithm` keyword in test
2024-05-09 07:57:40 -04:00
Donald Sharp
861d3758fa
Merge pull request #15965 from cscarpitta/bugfix/bgp-srv6-memleaks
bgpd: Fix SRv6 memory leaks spotted by Address Sanitizer
2024-05-09 07:11:56 -04:00
Donald Sharp
f739323ee2
Merge pull request #15967 from opensourcerouting/fix/drop_redundand_variable
bgpd: Remove redundant recursion flag variable
2024-05-09 07:11:01 -04:00
Donald Sharp
b19f624fba
Merge pull request #15972 from opensourcerouting/clang-ignore-defuns
build: make clang-format ignore DEFUN/DEFPY
2024-05-09 07:09:48 -04:00
Christian Hopps
0939f77b39 tests: fix mis-spelled cryptographic-algorithm keyword in test
Also update to use a newer hashing function while we are here.

fixes #15923

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-09 04:34:32 -04:00
Carmine Scarpitta
165caaeea8 bgpd: Move SRv6 cleanup functions
Move SRv6 cleanup operations to `bgp_srv6_cleanup` function.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-05-09 08:14:34 +02:00
Carmine Scarpitta
65e01119be bgpd: Fix SRv6 memory leaks spotted by ASAN
Fix a couple of memory leaks spotted by Address Sanitizer:

```

=================================================================
==970960==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 592 byte(s) in 2 object(s) allocated from:
    #0 0xfeb98b28a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xfeb98ae572f8 in qcalloc lib/memory.c:105
    #2 0xfeb98ae76138 in srv6_locator_chunk_alloc lib/srv6.c:138
    #3 0xb7f3c8508fa0 in ensure_vrf_tovpn_sid_per_vrf bgpd/bgp_mplsvpn.c:831
    #4 0xb7f3c8509494 in ensure_vrf_tovpn_sid bgpd/bgp_mplsvpn.c:866
    #5 0xb7f3c85028a8 in vpn_leak_postchange bgpd/bgp_mplsvpn.h:289
    #6 0xb7f3c851a7c0 in vpn_leak_postchange_all bgpd/bgp_mplsvpn.c:3769
    #7 0xb7f3c86f6ef0 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3378
    #8 0xfeb98afa6e14 in zclient_read lib/zclient.c:4608
    #9 0xfeb98af3d684 in event_call lib/event.c:2011
    #10 0xfeb98ae2788c in frr_run lib/libfrr.c:1217
    #11 0xb7f3c83cbf0c in main bgpd/bgp_main.c:545
    #12 0xfeb98a8973f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0xfeb98a8974c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0xb7f3c83c832c in _start (/usr/lib/frr/bgpd+0x2d832c)

Direct leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0xfeb98b28a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xfeb98ae572f8 in qcalloc lib/memory.c:105
    #2 0xb7f3c8508fd8 in ensure_vrf_tovpn_sid_per_vrf bgpd/bgp_mplsvpn.c:832
    #3 0xb7f3c8509494 in ensure_vrf_tovpn_sid bgpd/bgp_mplsvpn.c:866
    #4 0xb7f3c85028a8 in vpn_leak_postchange bgpd/bgp_mplsvpn.h:289
    #5 0xb7f3c851a7c0 in vpn_leak_postchange_all bgpd/bgp_mplsvpn.c:3769
    #6 0xb7f3c86f6ef0 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3378
    #7 0xfeb98afa6e14 in zclient_read lib/zclient.c:4608
    #8 0xfeb98af3d684 in event_call lib/event.c:2011
    #9 0xfeb98ae2788c in frr_run lib/libfrr.c:1217
    #10 0xb7f3c83cbf0c in main bgpd/bgp_main.c:545
    #11 0xfeb98a8973f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #12 0xfeb98a8974c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #13 0xb7f3c83c832c in _start (/usr/lib/frr/bgpd+0x2d832c)

Direct leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0xfeb98b28a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xfeb98ae572f8 in qcalloc lib/memory.c:105
    #2 0xb7f3c8506520 in vpn_leak_zebra_vrf_sid_update_per_vrf bgpd/bgp_mplsvpn.c:439
    #3 0xb7f3c85068d8 in vpn_leak_zebra_vrf_sid_update bgpd/bgp_mplsvpn.c:459
    #4 0xb7f3c86f6aec in bgp_ifp_create bgpd/bgp_zebra.c:3345
    #5 0xfeb98adfd3f8 in hook_call_if_real lib/if.c:48
    #6 0xfeb98adfe750 in if_new_via_zapi lib/if.c:181
    #7 0xfeb98af98084 in zclient_interface_add lib/zclient.c:2592
    #8 0xfeb98afa6d24 in zclient_read lib/zclient.c:4606
    #9 0xfeb98af3d684 in event_call lib/event.c:2011
    #10 0xfeb98ae2788c in frr_run lib/libfrr.c:1217
    #11 0xb7f3c83cbf0c in main bgpd/bgp_main.c:545
    #12 0xfeb98a8973f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0xfeb98a8974c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0xb7f3c83c832c in _start (/usr/lib/frr/bgpd+0x2d832c)

SUMMARY: AddressSanitizer: 656 byte(s) leaked in 6 allocation(s).

```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-05-09 08:14:34 +02:00
Christian Hopps
a8f20f504c mgmtd: add missing diagnostic show cmd output (notify maps)
- also add missing rpc client accounting bug in same diagnostic command.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-09 00:15:58 -04:00
David Lamparter
f39761e793 build: make clang-format ignore DEFUN/DEFPY
This makes clang-format not wreck all our hand-formatted DEFUN/DEFPY
statements.  We apparently missed this option when we originally looked
at setting up the .clang-format control file...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-08 21:47:14 +02:00
Donatas Abraitis
5ed6db5e9e
Merge pull request #15920 from chiragshah6/fdev2
zebra: fix EVPN svd based remote nh neigh del
2024-05-08 22:36:58 +03:00
David Lamparter
fdb1a6fed5 pimd: fix order of operations for evaluating join
join_desired looks at whether up->channel_oil is empty.  up->channel_oil
is updated from pim_forward_stop(), calling pim_channel_del_oif().  But
that was being called *after* updating join_desired, so join_desired saw
a non-empty OIL.  Pull up the pim_forward_stop() call to before updating
join_desired.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-08 21:21:30 +02:00
David Lamparter
dce38da806 pimd: fix null register before aging out reg-stop
It looks like the code was trying to do this with the null_register
parameter on pim_upstream_start_register_stop_timer(), but that didn't
quite work right.  Restructure a bit to get it right.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-08 21:21:30 +02:00
David Lamparter
b564c1d890 pimd: fix dr-priority range
0 is a valid DR priority.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-08 21:21:30 +02:00
Mark Stapp
8ac0a1d50e
Merge pull request #15946 from LabNConsulting/chopps/rpc-cleanup
mgmtd RPC minor cleanup
2024-05-08 11:14:55 -04:00
Donatas Abraitis
a8db605731 bgpd: Remove redundant recursion flag variable
Reuse an existing one.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-08 17:02:15 +03:00
Donald Sharp
c47f9ad7f4
Merge pull request #15962 from opensourcerouting/zmq-xref-setup
lib: stick `XREF_SETUP` into libfrrzmq
2024-05-08 09:56:12 -04:00
Russ White
feef093a24
Merge pull request #15942 from anlancs/isisd/doc-flex
doc: fix one command for isis
2024-05-08 08:35:42 -04:00
Donatas Abraitis
351716bfa6
Merge pull request #15950 from mxyns/draft-bmp-peer-up
bgpd: bmp rename tlv types
2024-05-08 14:50:26 +03:00
Martin Winter
8e2b2caf65
Merge pull request #15608 from vjardin/libyang3
libyang3 - fondation step 1
2024-05-08 12:48:03 +02:00
Vincent JARDIN
9fd31367b4 debian: libyang3
libyang3-dev is required.

TODO: add redhat, snapcraft

Suggested-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
2024-05-08 01:48:06 +02:00
Vincent JARDIN
290c6e3184 lib: libyang.so.3 compatibilty layers
Let's support libyang 2.2.8 using libyang.so.3.0.8
It requires the commit ed277585ea from the libyang.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
2024-05-08 01:48:06 +02:00
David Lamparter
74f43b720a lib: stick XREF_SETUP into libfrrzmq
Didn't catch this one when adding the warning/error (with -Werror) for
missing this.  Neither the CI nor I build with ZeroMQ enabled :(.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-07 23:07:42 +02:00
Donald Sharp
190f8baa7b
Merge pull request #15885 from opensourcerouting/gcc-unrecognized-ms-anon-tag
build: get rid of "unrecognized … anon-tag"
2024-05-07 16:00:53 -04:00
Russ White
8756deffbf
Merge pull request #15947 from anlancs/isisd/fix-lsp-json
isisd: fix json display for database command
2024-05-07 11:29:46 -04:00
Russ White
e941145272
Merge pull request #15627 from Max-Mustermann33/ospf6d_metric_for_type5_lsa
ospf6d: Fix metric when sending AS-external LSAs
2024-05-07 11:01:12 -04:00
Russ White
61c4d4f6c7
Merge pull request #15922 from anlancs/isisd/fix-unnecessary-check-vrf-cleanup
isisd: remove unnecessary checkings for vrf
2024-05-07 11:00:14 -04:00
Russ White
5aa4014bba
Merge pull request #15944 from lsang6WIND/fix-same-prefix
if: fix same connected address
2024-05-07 10:57:56 -04:00
Russ White
a2719333fd
Merge pull request #15945 from anlancs/isisd/fix-topology-algorithm-show
isisd: fix the display topology command
2024-05-07 10:57:33 -04:00
Christian Hopps
2661c0f62b mgmtd: some cleanup from original RPC commit
- Fix memleak on multiple errstr returns (multiple clients) Allow the
- multiple clients to all return results and merge them (as with other
  operations like get tree).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-07 14:54:57 +00:00
Russ White
048cd0c6a5
Merge pull request #15913 from opensourcerouting/fix/bgpd_no_set_as_prepend
bgpd: Fix `no set as-path prepend ASNUM...`
2024-05-07 10:51:48 -04:00
Russ White
ae01d44596
Merge pull request #15899 from gromit1811/ospf6_ecmp_inter_area_bugfix_15777_pr
ospf6d: Fix nexthop computation for inter-area multi-ABR ECMP
2024-05-07 10:48:32 -04:00
Russ White
ee853851bd
Merge pull request #15895 from opensourcerouting/fix/ignore_attributes_if_discard_is_configured
bgpd: Ignore validating the attribute flags if path-attribute is configured
2024-05-07 10:44:38 -04:00
anlan_cs
8b815dd2ad doc: fix one command for isis
Correct one command for isis based on code. And better the web page.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-07 22:01:27 +08:00
Russ White
5fe0c5923b
Merge pull request #15846 from Shbinging/fix_ip_ospf_dead_interval_fast_hello
ospfd: fix the bug where ip_ospf_dead-interval_minimal_hello-multiplier did not reset hello timer
2024-05-07 09:58:29 -04:00
Russ White
827badc53c
Merge pull request #15883 from opensourcerouting/fix/bgpd_gr_fsm
bgpd: Apply NOOP when doing negative commands for GR operations
2024-05-07 09:56:51 -04:00
Maxence Younsi
94f902fddb bgpd: bmp rename tlv types
renamed BMP_INFO_TYPE_SYSDESCR to BMP_INIT_INFO_TYPE_SYSDESCR
renamed BMP_INFO_TYPE_SYSNAME to BMP_INIT_INFO_TYPE_SYSNAME
added BMP_PEERUP_INFO_STRING

Signed-off-by: Maxou <maxence.younsi@insa-lyon.fr>
2024-05-07 15:53:51 +02:00
anlan_cs
639d8027f1 isisd: fix json display for database command
The current json display lost a lot of LSPs, added them.

Fixed the json format for two commands:
"show isis database detail json"
"show isis database json"

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-07 14:23:06 +08:00
Christian Hopps
a727cc7d76 mgmtd: rpc and action handling both should use rpc map.
The previous idea of using config xpath registrations for actions b/c
the config is the subject of the action is sub-optimal. It splits
handling of YANG "actions" (Action and RPCs) between 2 different
registartion maps for the same category of functionality.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-05-07 03:34:41 +00:00
anlan_cs
f185005b2f isisd: fix the display topology command
The unconfigured flexible algorithm should not be displayed.

Before:
```
anlan# show isis topology algorithm
Area A: Algorithm 128

Area A:Area A:Area A:Area A:Area A:Area A:Area A:Area A:Area A:Area ...
......
anlan#
```

After:
```
anlan# show isis topology algorithm
Area A: Algorithm 128

anlan#
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-07 09:25:02 +08:00
Christian Hopps
c54bc7a8dd
Merge pull request #15594 from idryzhov/mgmt-rpc
mgmtd: implement YANG RPC/action support
2024-05-06 16:05:50 -04:00
Loïc Sang
9eda89a244 if: fix same connected address
Using the same address with a different prefix length is not supported.
If we configure two identical addresses with different
netmasks 192.168.1.1/30 and then 192.168.1.1/29. Zebra sends
'192.168.1.1' with a prefix length of 29. However, the function
'zebra_interface_address_read()' reads '192.168.1.1/30' because the
prefix length is not checked.

Using 'same_prefix()' is more convenient.

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
2024-05-06 18:16:03 +02:00
Donald Sharp
216bac2826
Merge pull request #15902 from opensourcerouting/build-xref-setup-hppa
build: fix missing `XREF_SETUP` (and HP PA-RISC build failure)
2024-05-06 10:29:05 -04:00
Donald Sharp
9de2f138f0
Merge pull request #15889 from opensourcerouting/build-libatomic
build: link libatomic if available
2024-05-06 10:27:33 -04:00