Commit Graph

38290 Commits

Author SHA1 Message Date
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
Jafar Al-Gharaibeh
bbebaa5d6b
Merge pull request #17843 from LabNConsulting/chopps/new-docker-and-doc
Add Ubuntu 24.04 docker image and developer build doc
2025-01-13 13:16:49 -06:00
Mark Stapp
4086b9c492
Merge pull request #17839 from raja-rajasekar/rajasekarr/optimize_nh_compare
zebra: Optimize invoking nhg compare func
2025-01-13 13:47:12 -05:00
Donald Sharp
0af26e1728
Merge pull request #17844 from LabNConsulting/chopps/munet-0-15-3
tests: update munet to 0.15.3
2025-01-13 12:07:33 -05:00
Jafar Al-Gharaibeh
a78161de7f doc: building html/pdf user and developer documentation
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-13 10:24:12 -06:00
Jafar Al-Gharaibeh
fd4a76cb2f doc: fix LaTex warning when building pdf docs
LaTex doesn't like the Unicon character `≥` which should be represented
by the special sequnce `$\leq$`. Since this is buried all in Sphinx, and
we also have a scrip that look for the character, the easiest fix is to
just use `>=` instead which works without warnings, and without asking to
ignore every warning about the use of every instance of the special char.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-13 10:24:12 -06:00
Jafar Al-Gharaibeh
cda66453c1 pimd: explicitly ensure the RP src is BSR
With the recent suppoort of multiple sources of RPs, we can assume non static RPs
are BSR RPs. Just make the check explicit for BSR.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-13 10:18:24 -06:00
Jafar Al-Gharaibeh
c30a3ad890 pimd: fix BSR RPs timing out
On the BSR node itself, RPs shouldn't timeout, becase we know
the node is the BSR, and it is active!

fixes:#17587

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-13 10:18:24 -06:00
Donatas Abraitis
a39aa3eb37 lib: Adopt Lua stuff for Lua 5.4
lua_pcall() returns LUA_ERRGCMM in 5.3 which is already deprecated.

The constant LUA_ERRGCMM was removed.
Errors in finalizers are never propagated; instead, they generate a warning.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-13 16:34:15 +02:00
Donatas Abraitis
708f2ca620 configure: Adopt for Lua 5.4
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-13 16:34:14 +02:00
Rafael Zalamena
dda4f00f65 topotests: improve test reliability
Decrease the protocol timers, wait for peers to connect (and test it)
then finally wait a bit more for SAs to be propagated.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-01-13 09:26:17 -03:00
Donatas Abraitis
b330e6d3eb m4: Update ax_lua to support Lua 5.4
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-13 14:13:36 +02:00
Giovanni Tataranni
a09e949e48 tools: use f-string in frr-reload.py
Adopt f-string for printing log message, so that appropriate formatting can be
applied.

Signed-off-by: Giovanni Tataranni <g.tataranni@gmail.com>
2025-01-13 11:08:51 +01:00
Christian Hopps
3366056bce tests: update munet to 0.15.4
- add readline and waitline functions for use with popen objects
- other non-topotest (munet native) run changes
  - vm/qemu support booting cloud images (rocky, ubuntu, debian)
  - native topology init commands

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-12 16:15:02 +00:00
Christian Hopps
1cfccbf103 docker: add ubuntu24-ci docker image support
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-12 02:48:29 +00:00
Christian Hopps
901d059614 doc: add building for ubuntu 24.04, and refactor
- All 3 ubutu 2x (20.04, 22.04 and 24.04) have the same instructions
so put them in one include file.

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-12 02:27:10 +00:00
Enke Chen
d015e1d7d3 bgpd: remove unused safi in bgp_aggregate structure
Remove the unused safi field in bgp_aggregate structure.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2025-01-11 14:14:10 -08:00
Enke Chen
daf749e934 bgpd: fix churn of aggregate routes from duplicate config
Currently when an aggregate-address is configured, the existing
entry is always removed regardless whether any change is involved.
This would create unnecessary churn of the aggregate route when
the same config is applied for the aggregate address.

The fix is to check for duplicate aggregate-address config.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2025-01-11 14:01:36 -08:00
Jafar Al-Gharaibeh
8b4b88d4d6 tests: remove unnecessary wildcard fields from pim acl test
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-10 17:32:30 -06:00
Rajasekar Raja
e77954e5d9 zebra: Optimize invoking nhg compare func
In some cases, the old_re nhe and the newnhe is same and there is no
point in comparing them both since they are the same. Skip comparing in
such cases.

Ex:
2025/01/09 23:49:27.489020 ZEBRA: [W4Z4R-NTSMD] zebra_nhg_rib_find_nhe: => nhe 0x555f611d30c0 (44[38/39/45])
2025/01/09 23:49:27.489021 ZEBRA: [ZH3FQ-TE9NV] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 new id: 44 old id: 44
2025/01/09 23:49:27.489021 ZEBRA: [YB8HE-Z86GN] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 NEW 0x555f611d30c0 (44[38/39/45])
2025/01/09 23:49:27.489023 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489024 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 30.1.2.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489025 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.2[4] vrf default(0) wgt 1, with flags ACTIVE
2025/01/09 23:49:27.489026 ZEBRA: [ZM3BX-HPETZ] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 OLD 0x555f611d30c0 (44[38/39/45])
2025/01/09 23:49:27.489027 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489028 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 30.1.2.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489028 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.2[4] vrf default(0) wgt 1, with flags ACTIVE

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2025-01-10 13:39:12 -08:00
Donald Sharp
a962ff7833
Merge pull request #17829 from Jafaral/static-metric
tests: avoid nondeterministic route
2025-01-10 10:12:39 -05:00