]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
5 months agobgpd: Fix for match source-protocol in route-map for redistribute cmd
Rajasekar Raja [Mon, 21 Oct 2024 17:53:27 +0000 (10:53 -0700)]
bgpd: Fix for match source-protocol in route-map for redistribute cmd

A redistribute cmd can have a route-map attached to it and adding the
match source-protocol to that route-map means BGP to filter which
protocol routes to accept among the bunch of routes zebra is sending.

Fixing this since this wasnt implemented earlier.

Ticket :#4119692

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
5 months agoMerge pull request #16960 from donaldsharp/zebra_nhg_startup_issue
Mark Stapp [Mon, 4 Nov 2024 16:49:30 +0000 (11:49 -0500)]
Merge pull request #16960 from donaldsharp/zebra_nhg_startup_issue

zebra: On startup actually allow for nhe's to be early

5 months agoMerge pull request #17332 from nabahr/fix-import-test
Donald Sharp [Sun, 3 Nov 2024 22:54:20 +0000 (17:54 -0500)]
Merge pull request #17332 from nabahr/fix-import-test

tests: Remove unnecessary fields from expected JSON

5 months agoMerge pull request #17333 from cscarpitta/fix/fix-srv6-docs-misspelling
Donald Sharp [Sun, 3 Nov 2024 22:53:37 +0000 (17:53 -0500)]
Merge pull request #17333 from cscarpitta/fix/fix-srv6-docs-misspelling

doc: Fix a couple of misspellings in zebra documentation

5 months agoMerge pull request #17334 from cscarpitta/fix/fix-wrong-srv6-debug-macros
Donald Sharp [Sun, 3 Nov 2024 22:53:05 +0000 (17:53 -0500)]
Merge pull request #17334 from cscarpitta/fix/fix-wrong-srv6-debug-macros

zebra: Fix incorrect debug macros

5 months agoMerge pull request #17335 from cscarpitta/fix/bgp-use-ipv6-max-bitlen
Donald Sharp [Sun, 3 Nov 2024 22:51:20 +0000 (17:51 -0500)]
Merge pull request #17335 from cscarpitta/fix/bgp-use-ipv6-max-bitlen

bgpd: Replace 128 with `IPV6_MAX_BITLEN`

5 months agobgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN6 SIDs
Carmine Scarpitta [Sun, 3 Nov 2024 07:54:43 +0000 (08:54 +0100)]
bgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN6 SIDs

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agobgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN4 SIDs
Carmine Scarpitta [Sun, 3 Nov 2024 07:54:32 +0000 (08:54 +0100)]
bgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN4 SIDs

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agobgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 functions
Carmine Scarpitta [Sun, 3 Nov 2024 07:54:03 +0000 (08:54 +0100)]
bgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 functions

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:45:03 +0000 (08:45 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:44:41 +0000 (08:44 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:44:23 +0000 (08:44 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:43:55 +0000 (08:43 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:43:38 +0000 (08:43 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:43:17 +0000 (08:43 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:42:58 +0000 (08:42 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:42:36 +0000 (08:42 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling SRv6 formats command
Carmine Scarpitta [Sun, 3 Nov 2024 06:51:04 +0000 (07:51 +0100)]
doc: Fix misspelling SRv6 formats command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling locator format command
Carmine Scarpitta [Sun, 3 Nov 2024 06:50:11 +0000 (07:50 +0100)]
doc: Fix misspelling locator format command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling behavior usid command
Carmine Scarpitta [Sun, 3 Nov 2024 06:49:06 +0000 (07:49 +0100)]
doc: Fix misspelling behavior usid command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling locator prefix command
Carmine Scarpitta [Sun, 3 Nov 2024 06:48:44 +0000 (07:48 +0100)]
doc: Fix misspelling locator prefix command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Delay some processing until after startup is finished
Donald Sharp [Mon, 30 Sep 2024 16:41:06 +0000 (12:41 -0400)]
zebra: Delay some processing until after startup is finished

Currently zebra starts the graceful restart timer as well as
allows connections from clients before all data is read in
from the kernel as well as the possiblity of allowing client
connections before this happens as well.

Let's move the graceful restart timer start till after this is
done as well as not allowing client connections till then as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agotests: Remove unnecessary fields from expected JSON
Nathan Bahr [Fri, 1 Nov 2024 16:46:41 +0000 (16:46 +0000)]
tests: Remove unnecessary fields from expected JSON

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
5 months agoMerge pull request #17312 from donaldsharp/remove_in6addr_cmp
Donatas Abraitis [Fri, 1 Nov 2024 16:06:04 +0000 (18:06 +0200)]
Merge pull request #17312 from donaldsharp/remove_in6addr_cmp

Remove in6addr cmp

5 months agoMerge pull request #17280 from donaldsharp/remove_event_master_free_unused
Donatas Abraitis [Fri, 1 Nov 2024 16:03:44 +0000 (18:03 +0200)]
Merge pull request #17280 from donaldsharp/remove_event_master_free_unused

Remove event master free unused

5 months agoMerge pull request #17194 from LabNConsulting/aceelindem/ospf-ls-refresh-interval-fix
Russ White [Fri, 1 Nov 2024 15:37:32 +0000 (11:37 -0400)]
Merge pull request #17194 from LabNConsulting/aceelindem/ospf-ls-refresh-interval-fix

ospfd: Fix opaque LSA refresh interval and modify LSA cmds.

5 months agoMerge pull request #17230 from donaldsharp/clang_19_some_more
Jafar Al-Gharaibeh [Fri, 1 Nov 2024 14:02:31 +0000 (09:02 -0500)]
Merge pull request #17230 from donaldsharp/clang_19_some_more

Clang 19 some more

5 months agoMerge pull request #17328 from opensourcerouting/fix/allow_setting_netlink_buffer_siz...
Donald Sharp [Fri, 1 Nov 2024 14:00:18 +0000 (10:00 -0400)]
Merge pull request #17328 from opensourcerouting/fix/allow_setting_netlink_buffer_size_for_zebra

tests: Do not set by default netlink receive buffer size for Zebra

5 months agoMerge pull request #17329 from donaldsharp/wheel_name_is_useless
Mark Stapp [Fri, 1 Nov 2024 13:30:39 +0000 (09:30 -0400)]
Merge pull request #17329 from donaldsharp/wheel_name_is_useless

lib: Remove wheel name it is no longer used

5 months agoMerge pull request #17330 from donaldsharp/revert_ospf_asbr_status_change
Donatas Abraitis [Fri, 1 Nov 2024 08:11:13 +0000 (10:11 +0200)]
Merge pull request #17330 from donaldsharp/revert_ospf_asbr_status_change

Revert "ospfd: update ospf_asbr_status when using no_area_nssa command"

5 months agoRevert "ospfd: update ospf_asbr_status when using no_area_nssa command"
Donald Sharp [Fri, 1 Nov 2024 01:35:51 +0000 (21:35 -0400)]
Revert "ospfd: update ospf_asbr_status when using no_area_nssa command"

This reverts commit 71aa5ab7f6f166065e3b869e3c33ba5b7a57fccb.

5 months agoMerge pull request #17327 from donaldsharp/bgp_update_optimizations
Jafar Al-Gharaibeh [Thu, 31 Oct 2024 20:06:42 +0000 (15:06 -0500)]
Merge pull request #17327 from donaldsharp/bgp_update_optimizations

Bgp update optimizations

5 months agolib: Remove counter and a function
Donald Sharp [Mon, 28 Oct 2024 21:52:54 +0000 (17:52 -0400)]
lib: Remove counter and a function

The `alloc` counter was tracking the current active
number of events in the system and if it went to
0 when freeing a new one it would assert.  This
assert is a duplicate of what would happen with the
XFREE in the same situation.  As such it is not
necessary.

Also remove the `event_master_free_unused` function
from the system.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Remove call into event_master_free_unused
Donald Sharp [Mon, 28 Oct 2024 21:51:04 +0000 (17:51 -0400)]
bgpd: Remove call into event_master_free_unused

This call was originally put into place to help reduce
memory problems associated with bgp having a bajillion
events under load and then we would have a bunch of events
ready to be used on the unused list.  In the meantime
code was put into place that limited the depth of the
unused list to 10 elements.  This call has now become
unnecessary.  Let's just remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agolib: Remove wheel name it is no longer used
Donald Sharp [Thu, 31 Oct 2024 17:55:48 +0000 (13:55 -0400)]
lib: Remove wheel name it is no longer used

With commit:
60a3efec2458d9a1531f8204d0e4a91729d3fc00

The ability for the wheel code to display the name of what
wheel was actually being run was removed from the system.
Since we can no longer do this and it's been 4 years since it's
been in, let's just remove this bit of dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agoMerge pull request #17281 from nabahr/mrib-import
Donald Sharp [Thu, 31 Oct 2024 17:28:57 +0000 (13:28 -0400)]
Merge pull request #17281 from nabahr/mrib-import

Add support to import alternate URIB tables into the main MRIB

5 months agolib: In sockunion.c convert v6 memcmp's to IPV6_ADDR_CMP
Donald Sharp [Thu, 31 Oct 2024 14:06:26 +0000 (10:06 -0400)]
lib: In sockunion.c convert v6 memcmp's to IPV6_ADDR_CMP

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agotests: Do not set by default netlink receive buffer size for Zebra
Donatas Abraitis [Thu, 31 Oct 2024 15:00:20 +0000 (17:00 +0200)]
tests: Do not set by default netlink receive buffer size for Zebra

If we want to override this value - we can't because it's set by default to
90000000.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Move RFC 8212 check for inbound before filter in bgp_update
Donald Sharp [Wed, 30 Oct 2024 20:09:01 +0000 (16:09 -0400)]
bgpd: Move RFC 8212 check for inbound before filter in bgp_update

Currently the code to check to see if any input filters are
applicable is *before* the RFC 8212 check to see if we have
any filters at all.  As such we have already tested for this,
so let's move this check for RFC 8212 to immediately before
the input filter test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Convert rcvd_attr_printed to a bool
Donald Sharp [Wed, 30 Oct 2024 20:00:46 +0000 (16:00 -0400)]
bgpd: Convert rcvd_attr_printed to a bool

No need for a integer to store this, use a bool

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Refactor bgp_update some for nexthop reachability
Donald Sharp [Wed, 30 Oct 2024 19:44:12 +0000 (15:44 -0400)]
bgpd: Refactor bgp_update some for nexthop reachability

The nexthop reachability code was cut-n-pasted 2 times
with just a tiny bit of difference.  If we ever change
that it becomes `fun` to keep them in sync.  Since this
is more important than full on speed of code let's abstract
and get bgp_update() to be a bit easier to maintain.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: In bgp_update() for mac addrs ensure we are dealing with evpn
Donald Sharp [Wed, 30 Oct 2024 17:11:35 +0000 (13:11 -0400)]
bgpd: In bgp_update() for mac addrs ensure we are dealing with evpn

The code is just arbitrarily checking to see if there are any
mac addresses associated with a prefix.  This makes no
sense from the perspective that it can only happen as
an evpn route.  Let's not make non-evpn people pay
the price to check this data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: In bgp_update try to optimize is_loop_check variable
Donald Sharp [Wed, 30 Oct 2024 16:48:35 +0000 (12:48 -0400)]
bgpd: In bgp_update try to optimize is_loop_check variable

The variable is_loop_check is being set and then later
we test against it multiple times.  Move the setting
of whether or not to check for as loops to where it
is tested against and stop testing it multiple times.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Only set bgp_labels in bgp_update if we have num_labels
Donald Sharp [Wed, 30 Oct 2024 15:14:56 +0000 (11:14 -0400)]
bgpd: Only set bgp_labels in bgp_update if we have num_labels

In the interest of speeding up code, there is no point in
attempting to see if a label is usable if the number of labels
passed in is 0.  Since that is a much much quicker test than
the bgp_is_valid_label() call, let's test that first.

Additionally, there is no point in walking the label[] array
passed in unless we are in the if statement, so move it inside.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: allowas_in and aspath_loop_count only used in one if statement
Donald Sharp [Wed, 30 Oct 2024 15:05:11 +0000 (11:05 -0400)]
bgpd: allowas_in and aspath_loop_count only used in one if statement

In bgp_update(), the two variables allowas_in and aspath_loop_count
are only used when peer->change_local_as is true.  Move the retrieval
of the allowas_in data to inside the if statement to save some
(very) small amount of time in bgp_update not gathering this
data unless the particular peer has this set.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agolib, tests: Remove in6addr_cmp function from the system
Donald Sharp [Wed, 30 Oct 2024 14:41:08 +0000 (10:41 -0400)]
lib, tests: Remove in6addr_cmp function from the system

This function should just be memcmp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agolib: Replace usage of in6addr_cmp with memcmp
Donald Sharp [Wed, 30 Oct 2024 14:15:42 +0000 (10:15 -0400)]
lib: Replace usage of in6addr_cmp with memcmp

memcmp will return and act exactly the same as in6addr_cmp
but it does it significantly faster than how in6addr_cmp
does it.  Let this be a lesson for implementing something
that is a duplicate of what is provided by the c library.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agoMerge pull request #17317 from opensourcerouting/feature/allow_setting_custom_params_...
Jafar Al-Gharaibeh [Thu, 31 Oct 2024 13:55:23 +0000 (08:55 -0500)]
Merge pull request #17317 from opensourcerouting/feature/allow_setting_custom_params_for_daemons_unified_config

tests: Add an ability to specify daemon params with unified config

5 months agoMerge pull request #17318 from opensourcerouting/fix/add_missing_new_line_for_zebra_help
Mark Stapp [Thu, 31 Oct 2024 13:13:56 +0000 (09:13 -0400)]
Merge pull request #17318 from opensourcerouting/fix/add_missing_new_line_for_zebra_help

zebra: Add missing new line for help string

5 months agotests: Add zebra rib import-table tests
Nathan Bahr [Tue, 29 Oct 2024 15:06:36 +0000 (15:06 +0000)]
tests: Add zebra rib import-table tests

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
5 months agozebra: Add missing new line for help string
Donatas Abraitis [Thu, 31 Oct 2024 08:47:48 +0000 (10:47 +0200)]
zebra: Add missing new line for help string

```
  -A, --asic-offload        FRR is interacting with an asic underneath the linux kernel
      --v6-with-v4-nexthops Underlying dataplane supports v6 routes with v4 nexthops  -s, --nl-bufsize          Set netlink receive buffer size
```

Fixes: 1f5611c06d1c243b42279748788f0627793ead9c ("zebra: Allow zebra cli to accept v6 routes with v4 nexthops")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agotests: Add an ability to specify daemon params with unified config
Donatas Abraitis [Thu, 31 Oct 2024 08:43:28 +0000 (10:43 +0200)]
tests: Add an ability to specify daemon params with unified config

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17296 from LabNConsulting/liambrady/core-rlimit-respect-hard...
Donatas Abraitis [Thu, 31 Oct 2024 08:19:55 +0000 (10:19 +0200)]
Merge pull request #17296 from LabNConsulting/liambrady/core-rlimit-respect-hard-limit

tests: respect RLIMIT_CORE hard limit

5 months agoMerge pull request #17310 from opensourcerouting/fix/doc_build
Jafar Al-Gharaibeh [Wed, 30 Oct 2024 18:13:34 +0000 (13:13 -0500)]
Merge pull request #17310 from opensourcerouting/fix/doc_build

doc: Create html_context before setting READTHEDOCS

5 months agoMerge pull request #17311 from opensourcerouting/fix/syntax_topotests
Jafar Al-Gharaibeh [Wed, 30 Oct 2024 17:49:43 +0000 (12:49 -0500)]
Merge pull request #17311 from opensourcerouting/fix/syntax_topotests

doc: Use RST, not Markdown format for links

5 months agodoc: Use RST, not Markdown format for links
Donatas Abraitis [Wed, 30 Oct 2024 12:26:07 +0000 (14:26 +0200)]
doc: Use RST, not Markdown format for links

Fixes: d155d62785 ("doc: Require unified config for all new topotests")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agodoc: Create html_context before setting READTHEDOCS
Donatas Abraitis [Wed, 30 Oct 2024 12:15:36 +0000 (14:15 +0200)]
doc: Create html_context before setting READTHEDOCS

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 529, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/checkouts/latest/doc/user/conf.py", line 77, in <module>
    html_context["READTHEDOCS"] = True
    ^^^^^^^^^^^^
NameError: name 'html_context' is not defined

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #15563 from donaldsharp/bgp_musings
Russ White [Wed, 30 Oct 2024 10:04:45 +0000 (06:04 -0400)]
Merge pull request #15563 from donaldsharp/bgp_musings

Bgp musings

5 months agodoc: Document zebra table import command with additional mrib flag
Nathan Bahr [Tue, 29 Oct 2024 03:40:55 +0000 (03:40 +0000)]
doc: Document zebra table import command with additional mrib flag

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
5 months agozebra: Add ability to import alternate tables into the MRIB
Nathan Bahr [Mon, 28 Oct 2024 18:55:49 +0000 (18:55 +0000)]
zebra: Add ability to import alternate tables into the MRIB

Expanded the cli command to include an mrib flag for importing to
the main table MRIB instead of the main table URIB.
Piped through specifying the safi through the import table functions
rather than hardcoding to SAFI_UNICAST.
Import still only import routes from the URIB subtable, only added the
ability to import into the main table MRIB.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
5 months agozebra: Deconfuse clang-sa about possible NULL pointer
Donald Sharp [Fri, 25 Oct 2024 01:26:51 +0000 (21:26 -0400)]
zebra: Deconfuse clang-sa about possible NULL pointer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: workaround clang-sa for set but not used value
Donald Sharp [Fri, 25 Oct 2024 01:25:47 +0000 (21:25 -0400)]
bgpd: workaround clang-sa for set but not used value

Our switch statements with a default value confuse
clang-sa 19.  Make it happy.  Just following David's
earlier commit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: add some counters not displayed yet
Donald Sharp [Sat, 4 Nov 2023 03:26:56 +0000 (23:26 -0400)]
bgpd: add some counters not displayed yet

Add some counters to keep track how often stuff is done.
This is mainly for us developers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Further extend `show bgp attribute-info`
Donald Sharp [Sat, 16 Mar 2024 01:08:43 +0000 (21:08 -0400)]
bgpd: Further extend `show bgp attribute-info`

Fill out a bit more data about what is being held.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Optimize the usage of jhash
Donald Sharp [Sat, 16 Mar 2024 00:42:39 +0000 (20:42 -0400)]
bgpd: Optimize the usage of jhash

There are a bunch of jhash_1word uses.  Let's convert
to jhash_3word and get rid of some calls.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agotests: respect RLIMIT_CORE hard limit
Liam Brady [Tue, 29 Oct 2024 12:50:17 +0000 (08:50 -0400)]
tests: respect RLIMIT_CORE hard limit

In the case that the RLIMIT_CORE hard limit cannot
be raised on a system, do not fail due to an exception.
Instead, attempt to increase the soft limit to as large
a value as possible (e.g. to the set hard limit).

Signed-off-by: Liam Brady <lbrady@labn.net>
5 months agoMerge pull request #17251 from donaldsharp/bgp_best_path_evpn_issue
Russ White [Tue, 29 Oct 2024 14:16:37 +0000 (10:16 -0400)]
Merge pull request #17251 from donaldsharp/bgp_best_path_evpn_issue

bgpd: bestpath failure when you have a singlepath not in holddown

5 months agoMerge pull request #17226 from louis-6wind/fix-bmp-tests
Russ White [Tue, 29 Oct 2024 14:12:11 +0000 (10:12 -0400)]
Merge pull request #17226 from louis-6wind/fix-bmp-tests

tests: fix bmp tests random failure

5 months agoMerge pull request #17190 from baozhen-H3C/202410180176
Russ White [Tue, 29 Oct 2024 14:08:28 +0000 (10:08 -0400)]
Merge pull request #17190 from baozhen-H3C/202410180176

isisd: The command "'show isis vrf all summary json" has no output.

5 months agoMerge pull request #16990 from lsang6WIND/label-per-nexthop
Russ White [Tue, 29 Oct 2024 14:05:37 +0000 (10:05 -0400)]
Merge pull request #16990 from lsang6WIND/label-per-nexthop

bgpd: fix prefix same as nexthop in label per nexthop

5 months agoMerge pull request #17245 from fdumontet6WIND/fix1
Donatas Abraitis [Tue, 29 Oct 2024 12:12:05 +0000 (14:12 +0200)]
Merge pull request #17245 from fdumontet6WIND/fix1

bgpd:  fix crash when polling bgp4v2PathAttrTable

6 months agoMerge pull request #17278 from pguibert6WIND/bmp_listener
Donatas Abraitis [Tue, 29 Oct 2024 08:57:05 +0000 (10:57 +0200)]
Merge pull request #17278 from pguibert6WIND/bmp_listener

bgpd: fix blank line in running-config with bmp listener cmd

6 months agoMerge pull request #17189 from Shbinging/fix_some_ospf_unset_commands_syntax
Donatas Abraitis [Tue, 29 Oct 2024 08:43:53 +0000 (10:43 +0200)]
Merge pull request #17189 from Shbinging/fix_some_ospf_unset_commands_syntax

ospfd:fix syntax of some ospf no commands

6 months agoMerge pull request #17257 from pguibert6WIND/srv6_debug
Donatas Abraitis [Tue, 29 Oct 2024 08:32:20 +0000 (10:32 +0200)]
Merge pull request #17257 from pguibert6WIND/srv6_debug

zebra: add 'debug zebra srv6' command

6 months agoMerge pull request #17254 from donaldsharp/mrib_nht_wonky
Jafar Al-Gharaibeh [Mon, 28 Oct 2024 21:20:20 +0000 (16:20 -0500)]
Merge pull request #17254 from donaldsharp/mrib_nht_wonky

Mrib nht wonky

6 months agozebra: When installing a mroute, allow it to flow
Donald Sharp [Sat, 26 Oct 2024 01:56:14 +0000 (21:56 -0400)]
zebra: When installing a mroute, allow it to flow

Currently the mroute code was not allowing the mroute
to be sent to the dataplane.  This leaves us with a
situation where the routes being installed where never
being set as installed and additionally nht against
the mrib would not work if the route came into existence
after the nexthop tracking was asked for.

Turns out all the pieces where there to let this work.
Modify the code to pass it to the dplane and to send
it back up as having worked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
6 months agozebra: Add safi to some debugs
Donald Sharp [Fri, 25 Oct 2024 19:44:34 +0000 (15:44 -0400)]
zebra: Add safi to some debugs

Trying to figure out what safi we are talking about is fun when
it is not put into the debugs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
6 months agosharpd: Allow sharpd to watch nexthops in the mrib
Donald Sharp [Sat, 26 Oct 2024 01:21:32 +0000 (21:21 -0400)]
sharpd: Allow sharpd to watch nexthops in the mrib

Nothing special here, just allow sharpd to ask to watch
nexthops in the mrib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
6 months agoMerge pull request #17200 from opensourcerouting/vtysh-fix-list-find
Donald Sharp [Mon, 28 Oct 2024 18:05:29 +0000 (14:05 -0400)]
Merge pull request #17200 from opensourcerouting/vtysh-fix-list-find

vtysh: fix `find` and `list` commands

6 months agobgpd: fix blank line in running-config with bmp listener cmd
Philippe Guibert [Mon, 28 Oct 2024 15:04:45 +0000 (16:04 +0100)]
bgpd: fix blank line in running-config with bmp listener cmd

An extra blank line is added in show running-config with BMP:

> ubuntu2204hwe(config)# router bgp 65500
> ubuntu2204hwe(config-router)# bmp targets tgt
> ubuntu2204hwe(config-bgp-bmp)# bmp monitor ipv4 unicast pre-policy
> ubuntu2204hwe(config-bgp-bmp)# bmp listener 192.0.2.100 port 44
> ubuntu2204hwe(config-bgp-bmp)# do show running-config
>
> router bgp 65500
> [..]
>  bmp targets tgt
>   bmp monitor ipv4 unicast pre-policy
>                                       <-- blank line
>   bmp listener 192.0.2.100 port 44
>  exit

Remove the blank line.

Fixes: ed18356f1f2d ("bgpd/bmp: BMP implementation")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 months agozebra: add 'debug zebra srv6' command
Philippe Guibert [Tue, 8 Oct 2024 07:32:37 +0000 (09:32 +0200)]
zebra: add 'debug zebra srv6' command

Add a specific debug command to handle srv6 troubleshooting.
Move the srv6 traces that initially were under 'debug zebra packet'
debug.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 months agoMerge pull request #17243 from louis-6wind/fix-bgp-local-label
Donatas Abraitis [Mon, 28 Oct 2024 14:33:50 +0000 (16:33 +0200)]
Merge pull request #17243 from louis-6wind/fix-bgp-local-label

bgpd: fix display of local label in show bgp

6 months agoMerge pull request #16354 from Sokolmish/zebra-no-ra
David Lamparter [Mon, 28 Oct 2024 12:28:29 +0000 (13:28 +0100)]
Merge pull request #16354 from Sokolmish/zebra-no-ra

6 months agoMerge pull request #17250 from pguibert6WIND/flexalgo_uint8
Donatas Abraitis [Mon, 28 Oct 2024 10:30:46 +0000 (12:30 +0200)]
Merge pull request #17250 from pguibert6WIND/flexalgo_uint8

isisd: fix change flex-algorithm number from uint32 to uint8

6 months agoMerge pull request #17160 from opensourcerouting/fix/keep_zebra_on-rib-process_in_frr...
Jafar Al-Gharaibeh [Sun, 27 Oct 2024 23:23:36 +0000 (18:23 -0500)]
Merge pull request #17160 from opensourcerouting/fix/keep_zebra_on-rib-process_in_frr.conf

lib, zebra: Keep `zebra on-rib-process script` in frr.conf

6 months agoMerge pull request #17216 from Jafaral/fix-bsr
Donatas Abraitis [Sun, 27 Oct 2024 19:11:23 +0000 (21:11 +0200)]
Merge pull request #17216 from Jafaral/fix-bsr

pimd, tests: fix bsr assert and expand topotest to pimv6

6 months agoMerge pull request #17255 from systemcrash/patch-1
Donald Sharp [Sun, 27 Oct 2024 00:38:26 +0000 (20:38 -0400)]
Merge pull request #17255 from systemcrash/patch-1

docs: Update evpn.rst

6 months agodocs: Update evpn.rst
Paul Donald [Sat, 26 Oct 2024 12:23:57 +0000 (14:23 +0200)]
docs: Update evpn.rst

spelling

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
6 months agobgpd: bestpath failure when you have a singlepath not in holddown
Donald Sharp [Fri, 25 Oct 2024 21:17:53 +0000 (17:17 -0400)]
bgpd: bestpath failure when you have a singlepath not in holddown

When you have multiple paths to a particular route and a single
path changes.  In addition of the other paths are either in
hold down or not established or really just not selected you
could end up with a situation where the bestpath choosen
was a path that was in hold down.

Modify the code such that when there is nothing worse
in bestpath selection for the choosen path, but were
unable to do any sorting, just put the path on the top
of the list and declare it the winner.  Else just
do the original and put it at the end.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
6 months agobgpd: fix crash when polling bgp4v2PathAttrTable
Francois Dumontet [Mon, 21 Oct 2024 10:49:50 +0000 (12:49 +0200)]
bgpd:  fix crash when polling bgp4v2PathAttrTable

we have

(gdb) p *path->attr->aspath
$1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN}

It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV

fixe: return 0 when segments is null.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
6 months agoisisd: fix change flex-algorithm number from uint32 to uint8
Philippe Guibert [Fri, 25 Oct 2024 08:23:54 +0000 (10:23 +0200)]
isisd: fix change flex-algorithm number from uint32 to uint8

The algorithm number is encoded on 8 bits and does not require
an unsigned 32 bit value to store the value.

Fixes: cc4926c1284e ("isisd,yang: add algorithm-prefix-sid configuration tree")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 months agobgpd: fix display of local label in show bgp
Louis Scalbert [Fri, 25 Oct 2024 15:54:07 +0000 (17:54 +0200)]
bgpd: fix display of local label in show bgp

Fix the display of the local label in show bgp.

> r1# show bgp ipv4 labeled-unicast 172.16.2.2/32
> BGP routing table entry for 172.16.2.2/32, version 2
> Local label: 16 <---- MISSING
> Paths: (1 available, best #1, table default, vrf (null))
>   Advertised to non peer-group peers:
>  192.168.1.2
>  65501
>    192.168.1.2 from 192.168.1.2 (172.16.2.2)
>      Origin IGP, metric 0, valid, external, best (First path received)
>      Remote label: 3
>      Last update: Fri Oct 25 17:55:45 2024

Fixes: 67f67ba481 ("bgpd: Drop label_ntop/label_pton functions")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
6 months agoospfd: Fix opaque LSA refresh interval and modify LSA cmds.
Acee Lindem [Tue, 22 Oct 2024 14:48:33 +0000 (14:48 +0000)]
ospfd: Fix opaque LSA refresh interval and modify LSA cmds.

The configured OSPF refresh interval was not being used for opaque LSA (it always used the constant). Also, modified the timers lsa min-arrival command to have a maximum of 5000 msecs as well as providing a path for backward command compatibility.

Added missing user documentation for both timers lsa min-arrival and timers throttle lsa all.

Signed-off-by: Acee Lindem <acee@lindem.com>
6 months agotests: expand bsr topotest to cover ipv6
Jafar Al-Gharaibeh [Wed, 23 Oct 2024 05:09:06 +0000 (00:09 -0500)]
tests: expand bsr topotest to cover ipv6

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 months agopimd: allow a bsr with higher priority to take over
Jafar Al-Gharaibeh [Wed, 23 Oct 2024 19:14:58 +0000 (14:14 -0500)]
pimd: allow a bsr with higher priority to take over

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 months agopimd: allow resolving bsr via directly connected secondary address
Jafar Al-Gharaibeh [Wed, 23 Oct 2024 04:09:53 +0000 (23:09 -0500)]
pimd: allow resolving bsr via directly connected secondary address

This only matters to single hop nodes that are adjacent to the bsr. More common
with IPv6 where LL address is used in PIM as the primary address. If the BSR IP
happens to be an address on the same interface, the receiving pim router
rejects the BSR address because it expects the BSR IP to resolve via the LL address
even if we have a connected route for the same BSR IP subnet. Effectively, we want to
allow rpf to be resolved via secondary IPs with connected routes on the same interface,
and not limit them to primary addresses.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 months agotests: fix bgp_bmp_vrf race condition
Louis Scalbert [Thu, 24 Oct 2024 15:18:55 +0000 (17:18 +0200)]
tests: fix bgp_bmp_vrf race condition

The bgp_bmp_vrf topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp_vrf

bgp_bmp_vrf is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
6 months agotests: fix bgp_bmp race condition
Louis Scalbert [Thu, 24 Oct 2024 13:35:35 +0000 (15:35 +0200)]
tests: fix bgp_bmp race condition

The bgp_bmp topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp

bgp_bmp is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
6 months agotests: factorize code in bgp_bmp_vrf
Louis Scalbert [Thu, 24 Oct 2024 14:33:43 +0000 (16:33 +0200)]
tests: factorize code in bgp_bmp_vrf

Factorize code in bgp_bmp_vrf

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
6 months agotests: factorize code in bgp_bmp
Louis Scalbert [Thu, 24 Oct 2024 11:10:50 +0000 (13:10 +0200)]
tests: factorize code in bgp_bmp

Factorize code in bgp_bmp

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>