Commit graph

37295 commits

Author SHA1 Message Date
Donatas Abraitis 8cc6359fdc bgpd: Disable sending ROV extended community by default
https://datatracker.ietf.org/doc/html/rfc8097 defines ROV extended community,
but https://datatracker.ietf.org/doc/draft-ietf-sidrops-avoid-rpki-state-in-bgp
is against sending it by default even for iBGP peers.

Let's do this practice and reverse it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-19 16:25:12 +02:00
Donald Sharp 5bdb8d94c8
Merge pull request #17455 from opensourcerouting/erp-cs
pim6d: fix coverity scan warning
2024-11-19 09:25:04 -05:00
Donald Sharp 9b50371965
Merge pull request #17456 from opensourcerouting/fix/lua_unit_test
Lua casting
2024-11-19 09:24:40 -05:00
Donald Sharp bef0d10095
Merge pull request #17457 from opensourcerouting/fix/optimize_community_alias_lookup
bgpd: Optimize the way parsing communities if no community alias exists
2024-11-19 09:10:33 -05:00
Donatas Abraitis 004d770ec4 bgpd: Optimize the way parsing communities if no community alias exists
If at least one community alias is configured, then let's do the work,
otherwise we don't need to spend time on splitting stuff and creating
a new string.

This should improve the performance.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-18 23:29:53 +02:00
Donald Sharp 551e05bd2d
Merge pull request #17375 from opensourcerouting/fix/use_pcre2
packaging: Use PCRE2 for .deb/.rpm builds
2024-11-18 12:34:18 -05:00
Acee Lindem 82f4349402 tests: Add topotest for OSPF multi-instance default origination.
This change adds a topotest to test various case of OSPF multi-instance
origination including cases where the criteria route is from another
instance of OSPF, as well as the same OSPF instance (where a default
should not be originated).

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-11-18 17:05:31 +00:00
Donatas Abraitis 3c609266f5 bgpd: Use int, not long long for route-map action in Lua script
This is an issue for big-endian architectures, that causes incorrect castings.

lua_tointegerp() uses int*, not long long*.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-18 17:25:09 +02:00
Donatas Abraitis 77df36c3b9 lib: Fix Lua script unit test
When building for big-endian architectures, this is failing because of
long long / int casting issues, let's use a separate integer to get the
results.

This is especially important when building the Docker images for multiple arches.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-18 17:25:08 +02:00
Rafael Zalamena 3066f48eb8 pim6d: fix coverity scan warning
Fix Coverity Scan CID 1601875: use the return value to tell user about
the availability of a next hop to the learned RP (needs debug enabled).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-18 09:17:32 -03:00
Donatas Abraitis 0073c73858 tools: Fix syntax raw parsing for make-foobar helper
96 38.93 config.status: creating Makefile
96 39.48 /src/python/makefile.py:55: SyntaxWarning: invalid escape sequence '\s'
96 39.48   "^#\s*include.*_clippy.c",

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-18 11:04:27 +02:00
Donald Sharp 724624a35c
Merge pull request #17451 from opensourcerouting/fix/bgp_optimizations
bgpd: Optimize the outbound path if RFC8212 is applied
2024-11-17 12:03:52 -05:00
Acee Lindem 6afd56da96 ospfd: OSPF multi-instance default origination fixes
When originating a default AS-External LSA in one OSPF instance,
it wasn't working if the criteria route was installed by another OSPF
instance. This required more flexible processing of the OSPF external
route information.

Also fix problem multi-instance display for "show ip ospf
 <instance> database ...".

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-11-17 13:33:48 +00:00
Donatas Abraitis 2dc7db9251 bgpd: Optimize the outbound path if RFC8212 is applied
If we have (default enabled) enabled `bgp ebgp-require-policy`, then first check
it before applying the route-maps.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-17 14:41:05 +02:00
Donatas Abraitis 564a8bca2c
Merge pull request #17445 from cscarpitta/fix/sharp-use-ipv6-max-bitlen
sharpd: Convert numeric 128 into IPV6_MAX_BITLEN for prefixlen
2024-11-17 14:19:58 +02:00
Donatas Abraitis 0e2e4ec181
Merge pull request #17444 from cscarpitta/fix/sharpd-cli-help-string
sharpd: Fix a few typos in CLI help messages
2024-11-17 14:19:38 +02:00
Carmine Scarpitta 58b2e8c5b0 sharpd: Use IPV6_MAX_BITLEN in sharp send opaque notify
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-17 08:24:44 +01:00
Carmine Scarpitta 0019ecff1b sharpd: Use IPV6_MAX_BITLEN in sharp install seg6local-routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-17 08:24:18 +01:00
Carmine Scarpitta cf658b28b1 sharpd: Fix typo in sharp install seg6local-routes help message
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-17 08:16:26 +01:00
Carmine Scarpitta 4cb6f5b875 sharpd: Fix typo in sharp install seg6-routes help message
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-17 08:15:51 +01:00
Carmine Scarpitta 769751f6fc sharpd: Fix typo in sharp install routes help message
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-17 08:15:00 +01:00
Jafar Al-Gharaibeh 2f83660982
Merge pull request #17193 from opensourcerouting/frr-name-use
accords: guidelines/terms for FRRouting trademarks
2024-11-16 19:35:08 -06:00
Jafar Al-Gharaibeh 66b0a33e0c
Merge pull request #17427 from opensourcerouting/fix/more_details_for_ebgp_no_policy
bgpd: Add more details to ebgp requires policy warning
2024-11-16 19:32:54 -06:00
Jafar Al-Gharaibeh 7c46eb68d4
Merge pull request #17435 from opensourcerouting/fix/bgp_allow_0.0.0.0_if_multiple_nlris_exist
bgpd: Validate both nexthop information (NEXTHOP and NLRI)
2024-11-16 19:32:04 -06:00
Jafar Al-Gharaibeh f018a92c3b
Merge pull request #16937 from opensourcerouting/embedded-rp
pim6d: support embedded-rp
2024-11-16 19:30:20 -06:00
Donatas Abraitis c050972fec
Merge pull request #17432 from raja-rajasekar/rajasekarr/evpn_pop_items_bp
bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers
2024-11-16 12:51:20 +02:00
Donatas Abraitis a0d2734e87 bgpd: Validate both nexthop information (NEXTHOP and NLRI)
If we receive an IPv6 prefix e.g.: 2001:db8:100::/64 with nextop: 0.0.0.0, and
mp_nexthop: fc00::2, we should not treat this with an invalid nexthop because
of 0.0.0.0. We MUST check for MP_REACH attribute also and decide later if we
have at least one a valid nexthop.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-15 16:40:56 +02:00
Donatas Abraitis 229466ebd1 tests: Check if IPv6 prefix has a valid nexthop if multiple NLRIs exist
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-15 16:39:32 +02:00
Donald Sharp e2314c9169
Merge pull request #17434 from opensourcerouting/fix/bgp_color_parsing_ecomm
bgpd: Fix color extended community parsing
2024-11-15 09:21:52 -05:00
Rajasekar Raja 898852f269 bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers
In cases such as 'no advertise-all-vni' and L2 VNI DELETE, we need to
pop all the VPN routes present in the bgp_zebra_announce FIFO yet to
be processed regardless of VNI is configured or not.

NOTE: NO need to pop the VPN routes in two cases
 1) In free_vni_entry
   - Called by bgp_free()->bgp_evpn_cleanup().
   - Since bgp_delete is called before bgp_free and we pop all the dest
     pertaining to bgp under delete.
 2) evpn_delete_vni() when user configures "no vni" since the withdraw
    of all routes happen in normal cycle.

Fixes: a07df6f754
("bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation")

Ticket :#4163611

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-11-15 00:32:42 -08:00
Donatas Abraitis f765bc4144 bgpd: Use tmp_as when parsing color extended community
as is not initialized and it's assigned only later.

CID: 1601739

Fixes: 937cf4d ("bgpd:support of color extended community color-only types")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-15 08:16:10 +02:00
Donatas Abraitis 2b3d41493d Revert "bgpd: Fix color extended community parsing"
This reverts commit 8e771bda84.
2024-11-15 08:14:32 +02:00
Donatas Abraitis 53c858e70e bgpd: Add more details to ebgp requires policy warning
This will tell explicitly which peer does not have a filter applied.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-15 08:09:08 +02:00
Jafar Al-Gharaibeh 076879a279
Merge pull request #17433 from donaldsharp/zebra_debug_assert
Zebra debug assert
2024-11-14 21:52:49 -06:00
Donald Sharp 345ab24504
Merge pull request #17429 from opensourcerouting/fix/unsupported_commands_bgpd
bgpd: Drop unsupported commands
2024-11-14 19:47:44 -05:00
Donald Sharp 8a71bf9341 zebra: Put debug guards in zebra_vxlan.c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-14 16:08:47 -05:00
Donald Sharp d580af8394 zebra: zebra_vxlan.c assert on dev escape problem
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-14 16:03:14 -05:00
Donald Sharp 922489a8d6 zebra: Missed debug guard in zebra_evpn.c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-14 16:03:14 -05:00
Donatas Abraitis afb6f66f2b bgpd: Depracate no_synchronization_cmd, no_auto_summary_cmd commands
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-14 16:15:23 +02:00
Mark Stapp e2d9e19282
Merge pull request #17422 from opensourcerouting/fix/coverity_bgp_color
bgpd: Fix color extended community parsing
2024-11-14 08:27:47 -05:00
Donatas Abraitis f2f6d1ce0a
Merge pull request #17426 from mjstapp/fix_z_evpn_debug
zebra: fix unguarded debug in evpn code
2024-11-14 09:06:57 +02:00
Donald Sharp ced2658fc7
Merge pull request #17423 from opensourcerouting/fix/show_advertised_routes_plain_with_addpath
bgpd: Show neighbor advertised paths including addpath
2024-11-13 15:50:39 -05:00
Mark Stapp aee85f7c6a zebra: fix unguarded debug in evpn code
Guard a debug in the evpn code.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-11-13 13:49:28 -05:00
Rafael Zalamena 2add05a634 pimd: prevent invalid memory access
Signalize termination to functions so they can avoid accessing pointers
that might be no longer available.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Rafael Zalamena 2941f579f7 pimd: fix check-patch warning
Remove unnecessary braces.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Rafael Zalamena 3b1fc6fb44 pim6d: fix channel oil leak on embedded RP
When a multicast route is created with embedded RP the channel oil
never gets decremented when `clear ipv6 mroute` is called.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Rafael Zalamena 084fa66d74 doc: document and explain PIM embedded RP
Let user know about PIM embedded RP configuration commands.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Rafael Zalamena 744633eed0 topotests: new embedded RP topology test
Test embedded RP features:
- Embedded RP itself
- Embedded RP group list filtering
- Embedded RP limit

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Rafael Zalamena 23c7acd232 pim6d: support embedded-rp
Implement embedded RP support and configuration commands.

Embedded RP is disabled by default and can be globally enabled with the
command `embedded-rp` in the PIMv6 configuration node.

It supports the following options:
- Embedded RP maximum limit
- Embedded RP group filtering

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Donatas Abraitis 5cf9f6a79f bgpd: Reduce the nesting level for show_adj_route()
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-13 13:36:01 +02:00