Commit Graph

35483 Commits

Author SHA1 Message Date
EasyNetDev
0e040960d7
zebra: Update Zebra for DPDK >=22.11 API
* Starting from version DPDK 22.11 we have API changes:
The rte_driver and rte_device objects are now opaque and must be manipulated through added accessors.

We need to update Zebra DPDK sources to DPDK version >=22.11

* Fix clang-format

Signed-off-by: EasyNet <devel@easynet.dev>
2024-05-16 14:26:26 +03:00
Donald Sharp
b6f1b32c8a
Merge pull request #15961 from opensourcerouting/fix/allow_using_match_tag_0
lib: Allow doing match/set tag untagged
2024-05-13 09:59:36 -04:00
Donatas Abraitis
1b2eb32a9f
Merge pull request #15655 from idryzhov/isis-fix-subtlv-bit
isisd: fix ip/ipv6 reachability tlvs
2024-05-13 11:10:38 +03:00
Donatas Abraitis
5f8759a4aa
Merge pull request #15968 from donaldsharp/parse_attr_problems
Parse attr problems
2024-05-11 14:44:29 +03:00
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
Donatas Abraitis
adce8e066c tests: Check if set/match tag untagged works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-10 10:25:26 +03:00
Donatas Abraitis
e797b137f3 lib: Allow doing match/set tag untagged
In route-map: `match tag untagged`.

E.g. Cisco/Juniper allows that, but they use `match tag 0` instead.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-10 09:50:18 +03: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
Donald Sharp
bd4fca132a zebra: Ensure multipath encodes vxlan right for fpm usage
The fpm code path for the dplane_fpm_nl module was improperly
encoding the multipath nexthop data for vxlan type routes.
Move this into the embedded nexthop encoding where it belongs.

This change makes it so that the usage of `-M dplane_fpm_nl`
is now producing the same netlink messages that `-M fpm`
produces when using vxlan based nexthops.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-09 11:52:51 -04:00
Donald Sharp
569f9e4394 zebra: Move fpm check to inside of netlink_route_nexthop_encap
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-09 11:52:51 -04:00
Donald Sharp
ba5a3538e8 zebra: Move netlink_route_nexthop_encap
Move this static function earlier so we can avoid
a predecleartion.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-09 11:52:51 -04:00
Donald Sharp
084aba4ec0 zebra: Add 2 things to fpm_listener
1) Add ability to hex-dump the received packet for debugging
2) Receive encap type and vxlan vni and display them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-09 11:52:51 -04: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