Commit graph

37803 commits

Author SHA1 Message Date
Christian Hopps b9b608792d tests: ci: add ARM to docker based CI test
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-18 01:59:47 +00:00
Donatas Abraitis 76ed8f61d8
Merge pull request #17814 from donaldsharp/nhg_removal_in_some_situations 2025-01-17 17:31:19 +02:00
Donatas Abraitis 705e6f881b
Merge pull request #17836 from pguibert6WIND/limit_comm_list_count
limit community list count
2025-01-17 12:44:24 +02:00
Donald Sharp acc3cfe334
Merge pull request #17727 from idryzhov/netns-all-daemons
lib: introduce global -w option for VRF netns backend
2025-01-16 08:11:07 -05:00
Donatas Abraitis 4e363bd48d
Merge pull request #17862 from LabNConsulting/chopps/ldp-snmp-fix
ldp snmp/grpc test fix
2025-01-16 09:11:25 +02:00
Christian Hopps f71d5281ce tests: dont run ldp snmp test if no snmp
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-16 02:13:34 +00:00
Christian Hopps b0f9c4d688 tests: fix missed grpc test requirement for frr-backend addition
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-16 02:13:34 +00:00
Igor Ryzhov 754b949889 tests: use global -w option instead of per-daemon -n
Add ability to enable -w option for all daemons in a topotest and use
this option instead of the deprecated -n.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Igor Ryzhov 300f8dbda4 lib: introduce global -w option for VRF netns backend
Current -n option is only for zebra and mgmtd. All other daemons receive
the VRF backend configuration from zebra upon connection to it. This
leads to a potential race condition - daemons need to know the backend
before they start reading their config, but they can be not connected to
zebra yet at this point. As the VRF backend cannot change during runtime,
let's introduce a new global -w option for setting netns backend, to
make sure that all daemons know their VRF backend immediately after
start.

The reason for introducing a new option instead of making -n global is
that ospfd already uses -n for another purposes.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Igor Ryzhov 6f214d97d1 lib, zebra: move ns context intialization to zebra
vrf->ns_ctxt is only ever used in zebra, so move its initialization to
zebra's callback. Ideally this pointer shouldn't even be a part of
library's vrf struct, and moved to zebra-specific struct, but this is
the first step.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Igor Ryzhov 4877f2f685 lib: remove VRF_BACKEND_UNKNOWN
The backend type cannot be unknown. It is configured to VRF_LITE by
default in zebra anyway, so just init to VRF_LITE in the lib and remove
the UNKNOWN type.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Russ White 0bc373c573
Merge pull request #17838 from opensourcerouting/msdp-topo3
topotests: improve test reliability
2025-01-15 11:11:49 -05:00
Russ White 66a5d76920
Merge pull request #17810 from donaldsharp/bgp_connect_refactor
Bgp connect refactor
2025-01-15 11:11:41 -05:00
Donald Sharp d43bdb9568
Merge pull request #17855 from opensourcerouting/fix/bgp_enhe_capability_via_dynamic_capability
bgpd: Handle ENHE capability via dynamic capability
2025-01-15 10:34:39 -05:00
Donald Sharp 953d5fd526
Merge pull request #17799 from LabNConsulting/chopps/backend-yang-model
mgmtd backend yang model (depends on #17796)
2025-01-15 10:22:11 -05:00
Donald Sharp 5867c32161
Merge pull request #17776 from nabahr/group-rpf-mode
PIMD: RPF lookup mode per-group, per-source
2025-01-15 10:20:24 -05:00
Donatas Abraitis 5e41d30b44
Merge pull request #17854 from enkechen-panw/flag-reflected
bgpd: remove unused BATTR_REFLECTED for rmap_change_flags
2025-01-15 15:41:17 +02:00
Donatas Abraitis 93ea9748cf
Merge pull request #17859 from donaldsharp/active_routes_are_active
Active routes are active
2025-01-15 15:01:59 +02:00
Donald Sharp e9bd124149
Merge pull request #17858 from enkechen-panw/aggr-fix5
bgpd: move bgp_aggregate_increment() after bgp_path_info_add()
2025-01-15 07:37:12 -05:00
Donald Sharp ec6a000b0b zebra: On Nexthop install failure don't set Installation failed
Currently FRR when installing a nexthop group, the installation can fail.
The assumption with the code was that the current nexthop group was
not already installed.  This leaves a problem state where if the
users of the nexthop group are removed, the nexthop group will be
removed possibly leaving a orphaned nexthop group in the data plane.

FRR on a nexthop group installation does not actually know the status
of the nexthop group in the kernel.  It's possible that a earlier
version of the nexthop group is left in play.  It's possible that
there is no nexthop group in the kernel at all.  Leaving the
Installed flag alone allows upon Zebra removing the nexthop
group when it is removed from zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-14 16:23:40 -05:00
Donatas Abraitis d60320c6d2 bgpd: Handle ENHE capability via dynamic capability
FRR supports dynamic capability which is useful to exchange the capabilities
without tearing down the session. ENHE capability was missed to be included
handling via dynamic capability. Let's add it too.

This was missed and asked in Slack that it would be useful.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-14 22:46:53 +02:00
Donatas Abraitis d1cfd73060 tests: Check if ENHE capability can be handled dynamically
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-14 22:46:51 +02:00
Donald Sharp b61424a717 zebra: Nexthops need to be ACTIVE in some cases
Currently if you have an interface down event, Zebra
sets the nexthop(s) as !ACTIVE that use it.  On
interface up events the singleton nexthops are not being
set as ACTIVE.  Due to timing events it is sometimes
possible to end up with a route that is using a singleton

Change singleton nexthops to set the nexthop to ACTIVE.
This will allow the nexthop to be reinstalled appropriately
as well.

I was able to easily reproduce this using sharpd since
it does not attempt to reinstall the routes when a interface
goes up/down.

Before:

D>* 10.0.0.0/32 [150/0] via 192.168.102.34, dummy2, weight 1, 00:00:01

sharpd@eva ~/frr5 (master)> sudo ip link set dummy2 down ; sudo ip link set dummy2 up

D>  10.0.0.0/32 [150/0] (350) via 192.168.102.34, dummy2 inactive, weight 1, 00:00:10

After code change:

D>* 10.0.0.0/32 [150/0] (73) via 192.168.102.34, dummy2, weight 1, 00:00:14

sharpd@eva ~/frr5 (master)> sudo ip link set dummy2 down ; sudo ip link set dummy2 up

D>* 10.0.0.0/32 [150/0] (73) via 192.168.102.34, dummy2, weight 1, 00:00:21

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-14 15:12:32 -05:00
Christian Hopps 5f2a927d7b lib: northbound/mgmtd: add backend model support
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-14 18:48:59 +00:00
Donald Sharp 5f35096123
Merge pull request #17796 from LabNConsulting/chopps/datastore-notifications
operational-state (datastore) change notifications
2025-01-14 13:47:28 -05:00
Donald Sharp 67da971218
Merge pull request #17581 from mjstapp/fix_fpm_netlink
zebra: avoid race between FPM pthread and zebra main pthread in netlink encode/decode
2025-01-14 13:42:29 -05:00
Enke Chen c467af10b2 bgpd: move bgp_aggregate_increment() after bgp_path_info_add()
Route aggregation should be checked after a route is added, and
not before. This is for code flow and consistency.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2025-01-14 10:29:22 -08:00
Donald Sharp a6595fde70
Merge pull request #17850 from Jafaral/wr-rpg
pimd: always write cand-rp group config even when rp is inactive
2025-01-14 12:41:15 -05:00
Donald Sharp 1c6cd0009d
Merge pull request #17841 from Jafaral/pim-bsr-rp
pimd: fix BSR RPs timing out
2025-01-14 12:39:52 -05:00
Enke Chen 96ba273e4e bgpd: remove unused BATTR_REFLECTED for rmap_change_flags
Remove unused BATTR_REFLECTED for rmap_change_flags.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2025-01-14 08:46:54 -08:00
Russ White 4212bac7de
Merge pull request #17800 from opensourcerouting/fix/import_between_vrf_respect_allowas_in
bgpd: Respect allowas-in value from the source VRF's peer
2025-01-14 10:19:26 -05:00
Russ White d982b1c785
Merge pull request #17803 from anlancs/ospfd/fix-redundant-timers
ospfd: avoid the redundant timers
2025-01-14 10:17:20 -05:00
Russ White fbea5acc0b
Merge pull request #17806 from opensourcerouting/fix/lua5.4_support
Lua 5.4 support
2025-01-14 10:09:04 -05:00
Russ White 5e881db496
Merge pull request #17837 from enkechen-panw/aggr-fix4
bgpd: fix churn of aggregate routes from duplicate config
2025-01-14 10:05:06 -05:00
Donald Sharp 840b729b6b
Merge pull request #17842 from enkechen-panw/aggr-safi
bgpd: remove unused safi in bgp_aggregate structure
2025-01-14 09:37:39 -05:00
Donald Sharp ef4b28682b
Merge pull request #17846 from Jafaral/fix-latex-warn
doc: fix LaTex warnings, add documentation to build docs
2025-01-14 09:37:09 -05:00
Russ White b4619da938
Merge pull request #17639 from pguibert6WIND/bmp_import_vrf_view
Ability to import BMP information from a separate BGP instance
2025-01-14 08:38:37 -05:00
Philippe Guibert bd4b8c3dac topotest: add a test to control the community-list count
Add a test to control the community-list count.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-14 13:59:45 +01:00
Philippe Guibert f19b8668b3 bgpd: add 'match community-count' command to restrict comm count
Add a mechanism in route-map to filter out route-map which have a list
of communities greater than the given number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-14 13:59:42 +01:00
Donatas Abraitis ba4122d6db
Merge pull request #17840 from Jafaral/pim-acl-test
tests: remove unnecessary wildcard fields from pim acl test
2025-01-14 09:08:41 +02:00
Donatas Abraitis 1e1c70faac
Merge pull request #17847 from chiragshah6/freloadfix
tools: fix frr-reload for nbr deletion of no form cmds
2025-01-14 09:07:14 +02:00
Jafar Al-Gharaibeh 8e66f821bf pimd: always write cand-rp group config even when rp is inactive
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-13 23:34:08 -06:00
Christian Hopps c88b48929c lib: fix new (incorrect) CLANG SA warnings
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Christian Hopps 7f80885099 tests: add datastore notification test
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Christian Hopps 255026c2ce mgmtd: add notify selectors to filter datastore notifications
- Additionally push the selectors down to the backends

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Christian Hopps 709b2ae23f lib: notify on datastore (oper-state) changes
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Christian Hopps 80c6f98ea7 lib: if: track oper-state inline
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Christian Hopps e64966876c lib: vrf: track oper-state inline
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Christian Hopps 8a52b69ca4 lib: northbound: add basic oper-state update functions
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Chirag Shah 3ef97f0e2f tools: fix frr-reload for nbr deletion of no form cmds
When a bgp neighbor removed from associated to peer-group,
the neighbor is fully deleted, subsequent deletion of any
configuration related to the neighbor leads to failure
in frr-reload.
Handle any 'no neighbor ...' part of lines_to_del list

Testing:
Below first line would delete the neighbor swp1.10,
the existing code before the change handles to remove
config starts with 'neighbor swp1.10 ...' but not
'no neighbor swp1.10 ...'.

(Pdb) (lines_to_del)
 (('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2'),
 (('router bgp 100',), 'neighbor swp1.10 advertisement-interval 1'),
 (('router bgp 100',), 'neighbor swp1.10 timers 3 9'),
 (('router bgp 100',), 'neighbor swp1.10 timers connect 1'),
 (('router bgp 100',), 'no neighbor swp1.10 capability dynamic'),

Before fix:

(Pdb) (lines_to_del)
[(('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2'),
 (('router bgp 100',), 'no neighbor swp1.10 capability dynamic')]

frr-reload log:
2025-01-13 05:13:11,172  INFO: Executed "router bgp 100  no neighbor swp1.10 interface peer-group dpeergrp_2 exit"
2025-01-13 05:13:11,227 ERROR: Failed to execute router bgp 100  neighbor swp1.10 capability dynamic exit
2025-01-13 05:13:11,228 ERROR: "router bgp 100 --  neighbor swp1.10 capability dynamic -- exit" we failed to remove this command

After fix:

(Pdb)(lines_to_del)
 [(('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2')]

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2025-01-13 11:53:18 -08:00