Commit Graph

37380 Commits

Author SHA1 Message Date
Donatas Abraitis
b9a9be492e bgpd: Move some non BGP-specific route-map functions to lib
They are managed under `frr-route-map`, not under `frr-bgp-route-map`.

Fixes: https://github.com/FRRouting/frr/issues/17055

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-10 16:52:57 +03:00
Donatas Abraitis
310ca4f33d lib: Apply and generate route-map commands earlier before any other protocol
If e.g. BGP neighbor is using a route-map at the boot, that is not yet created,
then the log is spammed with `The route-map 'X' does not exist`.

Processing earlier, should do the trick.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-10 16:24:24 +03:00
Donald Sharp
0f8842ed18 bgpd: Allow specification of vrf in show bgp neighbor graceful-restart
This command did not allow the operator to display neighbor information
related to graceful-restart when used inside of a vrf.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-10 09:13:39 -04:00
Donald Sharp
cc7d89a82b
Merge pull request #17054 from opensourcerouting/fix/add_missing_logrotate_mgmtd
tools: Add missing mgmtd into logrotate/rsyslogd
2024-10-10 08:54:52 -04:00
Donatas Abraitis
f57a56bca0 tools: Add missing mgmtd into logrotate/rsyslogd
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-10 13:01:05 +03:00
Donatas Abraitis
5913d49d5b bgpd: Drop deprecated bgp network import-check exact command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-10 12:53:51 +03:00
Donatas Abraitis
2634ad94c6
Merge pull request #17050 from chriswiggins/doc/vrrp-in-vm-bridge
Adds note about VRRP issues inside a VM with underlying bridge networking
2024-10-10 12:45:49 +03:00
Louis Scalbert
6dc4d95061 topotests: add bgp_nexthop_ipv6
Add bgp_nexthop_ipv6 to check the ipv6 link-local nexthop conformity in
several situations.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-10 11:39:04 +02:00
Louis Scalbert
5bb99ccad2 bgpd: reset ipv6 invalid link-local nexthop
If the "nexthop-local unchanged" setting is enabled, it preserves the
IPv6 link-local nexthop from the originating peer. However, if the
originating and destination peers are not on the same network segment,
the originating peer's IPv6 link-local address will be unreachable from
the destination peer.

In such cases, reset the IPv6 link-local nexthop, even if "nexthop-local
unchanged" is set on the destination peer.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-10 11:39:04 +02:00
Louis Scalbert
34c1dd076e bgpd: do not insert link-local with local unchanged
Do not add an IPv6 link-local nexthop if the originating peer does not
provide one and the nexthop-local unchanged setting is enabled.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-10 11:38:58 +02:00
Donatas Abraitis
d30fa812ae
Merge pull request #17002 from louis-6wind/bfd-values
bfdd, yang: change bfd timer and multiplier values
2024-10-10 09:25:42 +03:00
Chris Wiggins
dbf39ad076 doc: VRRP troubleshooting info for linux-hosted VMs
Signed-off-by: Chris Wiggins <chris@wiggins.nz>
2024-10-10 17:44:23 +13:00
Jafar Al-Gharaibeh
f9f11c675f
Merge pull request #17042 from donaldsharp/zebra_pw_crash
zebra: Fix crash in pw code
2024-10-09 13:46:25 -05:00
Louis Scalbert
38ad215feb Revert "bgpd: Exclude case for remote prefix w/o link-local"
This reverts commit 5f6a61f91f.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-09 16:36:27 +02:00
baozhen-H3C
c2b70369b6 isisd: Lsp fragments will delete the corresponding dyn_cache entry.
When LSP fragments age, isis_dynhn_remove() is also called to remove the corresponding dyhn_cache entries.

Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
2024-10-09 19:41:07 +08:00
Donald Sharp
154a89bc31 zebra: Fix crash in pw code
Recent PR #17009 introduced a crash in pw handing
for deletion.  Let's fix that problem.

Fixes: #17041
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-09 07:17:29 -04:00
Philippe Guibert
7ae70eb5ef zebra: fix heap-use-after free on ns shutdown
The following ASAN issue has been observed:

> ERROR: AddressSanitizer: heap-use-after-free on address 0x6160000acba4 at pc 0x55910c5694d0 bp 0x7ffe3a8ac850 sp 0x7ffe3a8ac840
> READ of size 4 at 0x6160000acba4 thread T0
>         #0 0x55910c5694cf in ctx_info_from_zns zebra/zebra_dplane.c:3315
>     #1 0x55910c569696 in dplane_ctx_ns_init zebra/zebra_dplane.c:3331
>     #2 0x55910c56bf61 in dplane_ctx_nexthop_init zebra/zebra_dplane.c:3680
>     #3 0x55910c5711ca in dplane_nexthop_update_internal zebra/zebra_dplane.c:4490
>     #4 0x55910c571c5c in dplane_nexthop_delete zebra/zebra_dplane.c:4717
>     #5 0x55910c61e90e in zebra_nhg_uninstall_kernel zebra/zebra_nhg.c:3413
>     #6 0x55910c615d8a in zebra_nhg_decrement_ref zebra/zebra_nhg.c:1919
>     #7 0x55910c6404db in route_entry_update_nhe zebra/zebra_rib.c:454
>     #8 0x55910c64c904 in rib_re_nhg_free zebra/zebra_rib.c:2822
>     #9 0x55910c655be2 in rib_unlink zebra/zebra_rib.c:4212
>     #10 0x55910c6430f9 in zebra_rtable_node_cleanup zebra/zebra_rib.c:968
>     #11 0x7f26f275b8a9 in route_node_free lib/table.c:75
>     #12 0x7f26f275bae4 in route_table_free lib/table.c:111
>     #13 0x7f26f275b749 in route_table_finish lib/table.c:46
>     #14 0x55910c65db17 in zebra_router_free_table zebra/zebra_router.c:191
>     #15 0x55910c65dfb5 in zebra_router_terminate zebra/zebra_router.c:244
>     #16 0x55910c4f40db in zebra_finalize zebra/main.c:249
>     #17 0x7f26f2777108 in event_call lib/event.c:2011
>     #18 0x7f26f264180e in frr_run lib/libfrr.c:1212
>     #19 0x55910c4f49cb in main zebra/main.c:531
>     #20 0x7f26f2029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>     #21 0x7f26f2029e3f in __libc_start_main_impl ../csu/libc-start.c:392
>     #22 0x55910c4b0114 in _start (/usr/lib/frr/zebra+0x1ae114)

It happens with FRR using the kernel. During shutdown, the
namespace identifier is attempted to be obtained by zebra, in an
attempt to prepare zebra dataplane nexthop messages.

Fix this by accessing the ns structure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-08 22:25:55 +02:00
Jafar Al-Gharaibeh
47cdfbda76 build: FRR 10.3 development version
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-08 13:06:40 -05:00
Russ White
b8c458622d
Merge pull request #17023 from donaldsharp/dplane_problems
zebra: Allow dplane to pass larger number of nexthops down to dataplane
2024-10-08 11:45:27 -04:00
Russ White
a4fb596e3e
Merge pull request #17009 from donaldsharp/pw_cleanup
Pw cleanup
2024-10-08 10:56:28 -04:00
Russ White
374fda66df
Merge pull request #16945 from opensourcerouting/fix/bgp_received-routes_with_soft_inbound
bgpd: Show unmodified version of received-routes per neighbor
2024-10-08 10:16:24 -04:00
Russ White
8c00963a7a
Merge pull request #16942 from baozhen-H3C/202409271079
TI-LFA incorrectly included pseudo-nodes when calculating PQ space.
2024-10-08 10:15:19 -04:00
Russ White
02e5a059ee
Merge pull request #16941 from opensourcerouting/fix/issue_16877
bgpd: Relax the same prefix and nexthop to be valid
2024-10-08 10:14:30 -04:00
Donald Sharp
e3c7a0456a
Merge pull request #17022 from opensourcerouting/vrrp-cmsg-next
vrrpd: iterate over all ancillary messages
2024-10-08 09:31:18 -04:00
Donald Sharp
9f8968fc5a *: Allow 16 bit size for nexthops
Currently FRR is limiting the nexthop count to a uint8_t not a
uint16_t.  This leads to issues when the nexthop count is 256
which results in the count to overflow to 0 causing problems
in the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-08 09:26:57 -04:00
Russ White
382e4e9338
Merge pull request #15903 from y-bharath14/srib-topotests-v1
tests: catch exception during switch shutdown
2024-10-08 08:27:12 -04:00
Philippe Guibert
244155ac47 bfdd, doc, yang: change bfd timer and multiplier values
The minimum and maximum values for BFD timers and multiplier settings
have been updated to align with RFC 5880 requirements.

Since the values inputted via VTY are in milliseconds, the maximum
permissible value on the VTY interface is 4,294,967 milliseconds.

For the multiplier setting, the minimum value is now restricted to be
greater than zero, as zero is not allowed.

The minimum transmit interval has been set to 10 milliseconds to ensure
reliable service performance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-08 10:32:16 +02:00
Donatas Abraitis
4bf780fce9
Merge pull request #17014 from anlancs/fix/isisd-topo-check
isisd: fix wrong check for MT commands
2024-10-08 08:10:22 +03:00
Donatas Abraitis
ecfcd6c20a
Merge pull request #17024 from Jafaral/fix-autorp
pimd: fix a possible crash when enabling debug autorp
2024-10-08 08:03:52 +03:00
Donald Sharp
a8af2b2a9d zebra: Do not retry in 30 seconds on pw reachability failure
Currently the zebra pw code has setup a retry to install the
pw after 30 seconds when it is decided that reachability to
the pw is gone.  This causes a failure mode where the
pw code just goes and re-installs the pw after 30 seconds
in the non-reachability case.  Instead it should just be
reinstalling after reachability is restored.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-07 20:36:45 -04:00
Donald Sharp
f50b1f7c22 zebra: Move pw status settting until after we get results
Currently the pw code sets the status of the pw for install
and uninstall immediately when notifying the dplane.  This
is incorrect in that we do not actually know the status at
this point in time.  When we get the result is when to set
the status.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-07 20:36:45 -04:00
Jafar Al-Gharaibeh
a49acba1d4 pimd: fix a possible crash when enabling debug autorp
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-07 18:22:06 -05:00
Igor Ryzhov
c10e4d336b
Merge pull request #17015 from LabNConsulting/chopps/load-internal-ietf-yang-library
lib: add flag to have libyang load internal ietf-yang-library module
2024-10-07 20:33:23 +03:00
Rafael Zalamena
5e1a3cd2ad vrrpd: iterate over all ancillary messages
Assign the return of `CMSG_NXTHDR` so we can really iterate over the
ancillary data.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-10-07 13:05:10 -03:00
Donatas Abraitis
ded59bcc72
Merge pull request #17013 from dksharp5/removal_functions
Removal functions
2024-10-07 11:47:01 +03:00
Donatas Abraitis
86a2c829eb
Merge pull request #17012 from dksharp5/remove_function
zebra: remove unused function rib_lookup_ipv4
2024-10-07 11:45:05 +03:00
Christian Hopps
e8648a0c72 lib: add flag to have libyang load internal ietf-yang-library module
Mgmtd makes use of libyang's internal ietf-yang-library module to add
support for said module to FRR management. Previously, mgmtd was loading
this module explicitly; however, that required that libyang's
`ietf-yang-library.yang` module definition file be co-located with FRR's
yang files so that it (and ietf-datastore.yang) would be found when
searched for by libyang using FRRs search path. This isn't always the
case depending on how the user compiles and installs libyang so mgmtd
was failing to run in some cases.

Instead of doing it the above way we simply tell libyang to load it's
internal version of ietf-yang-library when we initialize the libyang
context.

This required adding a boolean to a couple of the init functions which
is why so many files are touched (although all the changes are minimal).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-10-07 03:32:44 +00:00
anlan_cs
424cec61c0 isisd: fix wrong check for MT commands
```
anlan# show run
!
interface eth0
 ip router isis A
exit
!
router isis A
 metric-style narrow <- NOT wide
exit
!
end
anlan (config)# int eth0
anlan (config-if)# no isis topology ipv6-unicast
% Configuration failed.

Error type: validation
Error description: Multi topology IS-IS can only be used with wide metrics
```

The MT commands are mainly controlled by the binded area, not by interface.
Currently if there is any MT configuration in the area, `metric-style` must
be with the `wide` mode, this requirement is sufficient.  So, the
unnecessary/wrong check for MT in the interface should be removed.

Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-10-07 09:12:42 +08:00
Donna Sharp
f62dfc5d53 lib,zebra: remove unused ZEBRA_VRF_UNREGISTER
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-06 19:40:49 -04:00
Donna Sharp
103f24485c zebra: remove unsued function from tc_netlink.c
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-06 19:30:56 -04:00
Donna Sharp
7a63799a84 zebra: remove unused function from if_netlink.c
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-06 19:25:44 -04:00
Donna Sharp
b6dd4ff8bc zebra: remove unused function from tc_netlink.c
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-06 19:08:44 -04:00
Donna Sharp
8eb5f4f506 zebra: remove unused function rib_lookup_ipv4
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2024-10-06 18:53:11 -04:00
Donatas Abraitis
28a614d17b
Merge pull request #17010 from anlancs/fix/tools-pim-interface-wrong-2
tools: fix some special commands for reloading pim
2024-10-06 21:10:53 +03:00
anlan_cs
e3a846754d tools: fix some special commands for reloading pim
The issue is we can't remove all pim configurations including some
special configurations (e.g., `no ip pim bsm`) for one interface.

For one pim-disable interface, all such pim depdendent options
(including `ip pim ` and `no ip pim `) should be completely removed.

Also append `no ip multicast` for the same purpose, it is no use at present,
but for future use.

The running config:
```
interface A
 ip pim
 no ip pim bsm
exit
```

Reload the new config:
```
interface A
exit
```

Before:
```
2024-10-05 20:52:33,467  INFO: Executed "interface A  no ip pim exit"
2024-10-05 20:52:33,482  INFO: Executed "interface A  ip pim bsm exit"
```
And the pim configurations in running configuration are not removed after reloading:
```
interface A
 ip pim <- Wrong
exit
```

After:
```
2024-10-05 20:56:27,489  INFO: Executed "interface A  no ip pim exit"
```
And all the pim configuration are removed.

Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-10-05 22:00:01 +08:00
Russ White
15991e1a08
Merge pull request #16800 from donaldsharp/nhg_reuse_intf_down_up
Nhg reuse intf down up
2024-10-04 10:28:58 -04:00
Donald Sharp
c6e9443086
Merge pull request #17000 from fsb4000/patch-1
zebra: Fix crash during reconnect
2024-10-04 07:41:12 -04:00
Igor Zhukov
a3877e4444 zebra: Fix crash during reconnect
fpm_enqueue_rmac_table expects an fpm_rmac_arg* as its argument.

The issue can be reproduced by dropping the TCP session using:

ss -K dst 127.0.0.1 dport = 2620

I used Fedora 40 and frr 9.1.2 and I got the gdb backtrace:

(gdb) bt
0  0x00007fdd7d6997ea in fpm_enqueue_rmac_table (bucket=0x2134dd0, arg=0x2132b60) at zebra/dplane_fpm_nl.c:1217
1  0x00007fdd7dd1560d in hash_iterate (hash=0x21335f0, func=0x7fdd7d6997a0 <fpm_enqueue_rmac_table>, arg=0x2132b60) at lib/hash.c:252
2  0x00007fdd7dd1560d in hash_iterate (hash=0x1e5bf10, func=func@entry=0x7fdd7d698900 <fpm_enqueue_l3vni_table>,
    arg=arg@entry=0x7ffed983bef0) at lib/hash.c:252
3  0x00007fdd7d698b5c in fpm_rmac_send (t=<optimized out>) at zebra/dplane_fpm_nl.c:1262
4  0x00007fdd7dd6ce22 in event_call (thread=thread@entry=0x7ffed983c010) at lib/event.c:1970
5  0x00007fdd7dd20758 in frr_run (master=0x1d27f10) at lib/libfrr.c:1213
6  0x0000000000425588 in main (argc=10, argv=0x7ffed983c2e8) at zebra/main.c:492

Signed-off-by: Igor Zhukov <fsb4000@yandex.ru>
2024-10-04 14:59:14 +07:00
Donald Sharp
1a923e080a
Merge pull request #16994 from louis-6wind/bmp-adj-labels
bgpd: export labels to pre-policy bmp
2024-10-03 15:08:36 -04:00
Donald Sharp
15ecd816a4
Merge pull request #16993 from louis-6wind/bfd-no-variants
bfdd: add no variants to all configurations
2024-10-03 10:41:40 -04:00