]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
11 months agoisisd: fix show isis topology display
Louis Scalbert [Wed, 22 May 2024 11:30:05 +0000 (13:30 +0200)]
isisd: fix show isis topology display

Fix "Area X:" display for fabricd

Fixes: f185005b2f ("isisd: fix the display topology command")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
11 months agoisisd: fix show isis route algorithm crash
Louis Scalbert [Wed, 22 May 2024 09:30:24 +0000 (11:30 +0200)]
isisd: fix show isis route algorithm crash

Fix crash with "show isis route algorithm X" command.

Fixes: 88e368b4dc ("isisd: make optional algorithm id in 'show isis route'")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
11 months agoMerge pull request #16032 from Pdoijode/pdoijode/zebra-rt-deny-fix
Russ White [Tue, 21 May 2024 14:52:52 +0000 (10:52 -0400)]
Merge pull request #16032 from Pdoijode/pdoijode/zebra-rt-deny-fix

zebra: Deny the routes if ip protocol CLI refers to an undefined rmap

11 months agoMerge pull request #16052 from donaldsharp/show_ip_route_summary
Russ White [Mon, 20 May 2024 21:39:21 +0000 (17:39 -0400)]
Merge pull request #16052 from donaldsharp/show_ip_route_summary

Show ip route summary

11 months agoMerge pull request #16037 from zhou-run/202405111552
Russ White [Mon, 20 May 2024 21:35:54 +0000 (17:35 -0400)]
Merge pull request #16037 from zhou-run/202405111552

isisd: fix crash when configuring the circuit type for the interface.

11 months agozebra: Deny the routes if ip protocol CLI refers to an undefined rmap 16032/head
Pooja Jagadeesh Doijode [Thu, 16 May 2024 23:36:18 +0000 (16:36 -0700)]
zebra: Deny the routes if ip protocol CLI refers to an undefined rmap

Currently zebra does not deny the routes if `ip protocol <proto> route-map
FOO`
commmand is configured with reference to an undefined route-map (FOO in
this case).
However, on FRR restart, in zebra_route_map_check() routes get denied
if route-map name is available but the route-map is not defined. This
change was introduced in fd303a4ba14c762550db972317e1e88528768005.

Fix:
When `ip protocol <proto> route-map FOO` CLI is configured with reference to an
undefined route-map FOO, let the processing in ip_protocol_rm_add() and
ip_protocol_rm_del() go through so that zebra can deny the routes instead
of simply returning. This will result in consistent behavior.

Testing Done:

Before fix:
```
spine-1# configure
spine-1(config)# ip protocol bgp route-map rmap7

root@spine-1:mgmt:/var/home/cumulus# vtysh -c "show run" | grep rmap7
ip protocol bgp route-map rmap7
root@spine-1:mgmt:/var/home/cumulus#

spine-1(config)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       Z - FRR,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 27.0.0.1/32 is directly connected, lo, 02:27:45
B>* 27.0.0.3/32 [20/0] via fe80::202:ff:fe00:21, downlink_1, weight 1, 02:27:35
B>* 27.0.0.4/32 [20/0] via fe80::202:ff:fe00:29, downlink_2, weight 1, 02:27:40
B>* 27.0.0.5/32 [20/0] via fe80::202:ff:fe00:31, downlink_3, weight 1, 02:27:40
B>* 27.0.0.6/32 [20/0] via fe80::202:ff:fe00:39, downlink_4, weight 1, 02:27:40
```

After fix:
```
spine-1(config)# ip protocol bgp route-map route-map67
spine-1(config)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       Z - FRR,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 27.0.0.1/32 is directly connected, lo, 00:35:03
B   27.0.0.3/32 [20/0] via fe80::202:ff:fe00:21, downlink_1 inactive, weight 1, 00:34:58
B   27.0.0.4/32 [20/0] via fe80::202:ff:fe00:29, downlink_2 inactive, weight 1, 00:34:57
B   27.0.0.5/32 [20/0] via fe80::202:ff:fe00:31, downlink_3 inactive, weight 1, 00:34:57
B   27.0.0.6/32 [20/0] via fe80::202:ff:fe00:39, downlink_4 inactive, weight 1, 00:34:58
spine-1(config)#

root@spine-1:mgmt:/var/home/cumulus# ip route show
root@spine-1:mgmt:/var/home/cumulus#
```

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
11 months agodoc: Add missing `show ip route summ` command 16052/head
Donald Sharp [Mon, 20 May 2024 19:46:29 +0000 (15:46 -0400)]
doc: Add missing `show ip route summ` command

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agodoc: Fixup `show ip route` command doc
Donald Sharp [Mon, 20 May 2024 19:44:00 +0000 (15:44 -0400)]
doc: Fixup `show ip route` command doc

The documentation for this command is just... wrong.
Let's clean it up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agoMerge pull request #15980 from donaldsharp/agentx_update
Donatas Abraitis [Mon, 20 May 2024 19:33:01 +0000 (22:33 +0300)]
Merge pull request #15980 from donaldsharp/agentx_update

*: Modify agentx to be allowed to be called

11 months agoMerge pull request #16022 from opensourcerouting/fix/match_peer
Donald Sharp [Mon, 20 May 2024 13:57:20 +0000 (09:57 -0400)]
Merge pull request #16022 from opensourcerouting/fix/match_peer

bgpd: Fix `match peer` when switching between IPv4/IPv6/interface

11 months agoMerge pull request #16033 from opensourcerouting/fix/typo_soft_version_capability
Donald Sharp [Mon, 20 May 2024 13:45:41 +0000 (09:45 -0400)]
Merge pull request #16033 from opensourcerouting/fix/typo_soft_version_capability

bgpd: Fix logging message when receiving a software version capability

11 months agoMerge pull request #16035 from raja-rajasekar/rajasekarr/backpressure_infinite_loop
Donatas Abraitis [Mon, 20 May 2024 06:54:04 +0000 (09:54 +0300)]
Merge pull request #16035 from raja-rajasekar/rajasekarr/backpressure_infinite_loop

bgpd: backpressure - Fix to avoid CPU hog

11 months agoMerge pull request #16034 from raja-rajasekar/rajasekarr/backpressure_l3_evpn_fix
Donatas Abraitis [Mon, 20 May 2024 06:50:55 +0000 (09:50 +0300)]
Merge pull request #16034 from raja-rajasekar/rajasekarr/backpressure_l3_evpn_fix

bgpd: backpressure - Fix to withdraw evpn type-5 routes immediately

11 months agoMerge pull request #16019 from anlancs/ldpd/fix-cmd-1
Donatas Abraitis [Sat, 18 May 2024 13:11:39 +0000 (16:11 +0300)]
Merge pull request #16019 from anlancs/ldpd/fix-cmd-1

zebra: fix mpls command

11 months agoMerge pull request #16009 from anlancs/zebra/fix-fpm-nl
Donatas Abraitis [Sat, 18 May 2024 13:11:10 +0000 (16:11 +0300)]
Merge pull request #16009 from anlancs/zebra/fix-fpm-nl

zebra: fix wrong fpm packet header

11 months agoisisd: fix crash when configuring the circuit type for the interface. 16037/head
zhou-run [Sat, 18 May 2024 03:13:35 +0000 (11:13 +0800)]
isisd: fix crash when configuring the circuit type for the interface.

1. When both Router A and Router B are configured with "is-type level-1," the area->is_type will be assigned the value IS_LEVEL_1, and circuit->is_type will also be assigned the value IS_LEVEL_1.
2. Configuring the circuit type "isis circuit-type level-1-2" for the interface of Router A will inadvertently call lib_interface_isis_circuit_type_modify to assign circuit->is_type the value IS_LEVEL_1_AND_2. This causes the hello packets reception and transmission, as well as the reception of LSP/SNP packets, to check circuit->is_type, allowing the level-2 hello packets to be sent and received normally, and level-2 LSP/SNP packets to be received normally.
3. When Router B modifies the configuration to "is-type level-2," and Router A and Router B establish a level-2 neighbor relationship, Router B sends level-2 LSP packets to Router A. Upon receiving these, Router A calls isis_spf_schedule to calculate the level-2 SPT, which results in accessing a null pointer.
When defining the behavior of the ISIS router, the call to isis_area_is_type_set will check that area->is_type is not IS_LEVEL_1_AND_2, and it disallows circuit->is_type_config from overriding circuit->is_type. Therefore, when configuring the circuit type for the interface of Router A, it should also check that area->is_type is not IS_LEVEL_1_AND_2 and disallow circuit->is_type_config from overriding circuit->is_type.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
11 months agobgpd: backpressure - Fix to avoid CPU hog 16035/head
Rajasekar Raja [Fri, 17 May 2024 22:43:59 +0000 (15:43 -0700)]
bgpd: backpressure - Fix to avoid CPU hog

In case when bgp_evpn_free or bgp_delete is called and the announce_list
has few items where vpn/bgp does not match, we add the item back to the
list. Because of this the list count is always > 0 thereby hogging CPU or
infinite loop.

Ticket: #3905624

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
11 months agobgpd: backpressure - Fix to withdraw evpn type-5 routes immediately 16034/head
Rajasekar Raja [Fri, 17 May 2024 19:36:31 +0000 (12:36 -0700)]
bgpd: backpressure - Fix to withdraw evpn type-5 routes immediately

As part of backpressure changes, there is a bug where immediate withdraw
is to be sent for evpn imported type-5 prefix to clear the nh neigh and
RMAC entry.

Fixing this by sending withdraw immediately to keep it inline with the
code today

Ticket: #3905571

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
11 months agobgpd: Fix logging message when receiving a software version capability 16033/head
Donatas Abraitis [Fri, 17 May 2024 19:04:40 +0000 (22:04 +0300)]
bgpd: Fix logging message when receiving a software version capability

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agoMerge pull request #16012 from LabNConsulting/chopps/improve-grpc-test
Donald Sharp [Fri, 17 May 2024 15:48:27 +0000 (11:48 -0400)]
Merge pull request #16012 from LabNConsulting/chopps/improve-grpc-test

tests: improve the grpc query client and topotest

11 months agoMerge pull request #16001 from EasyNetDev/dpdk->=22.11-API-fix
Donald Sharp [Fri, 17 May 2024 13:41:59 +0000 (09:41 -0400)]
Merge pull request #16001 from EasyNetDev/dpdk->=22.11-API-fix

zebra: Update Zebra DPDK >=22.11 API

11 months agoMerge pull request #16024 from LabNConsulting/chopps/grpc-unit-test-fix
Donald Sharp [Fri, 17 May 2024 11:23:39 +0000 (07:23 -0400)]
Merge pull request #16024 from LabNConsulting/chopps/grpc-unit-test-fix

tests: embed YANG in mgmtd unit-test bin

11 months agoMerge pull request #16020 from louis-6wind/fix-bgp-llgr
Donatas Abraitis [Fri, 17 May 2024 06:39:51 +0000 (09:39 +0300)]
Merge pull request #16020 from louis-6wind/fix-bgp-llgr

bgpd: fix dynamic peer graceful restart race condition

11 months agotests: embed YANG in mgmtd unit-test bin 16024/head
Christian Hopps [Fri, 17 May 2024 04:54:20 +0000 (00:54 -0400)]
tests: embed YANG in mgmtd unit-test bin

`make check` should run w/o installing FRR first. Thus we need to embed
the yang modules otherwise mgmtd unit-test fails.

Signed-off-by: Christian Hopps <chopps@labn.net>
11 months agobgpd: Fix `match peer` when switching between IPv4/IPv6/interface 16022/head
Donatas Abraitis [Thu, 16 May 2024 17:49:56 +0000 (20:49 +0300)]
bgpd: Fix `match peer` when switching between IPv4/IPv6/interface

Without this patch we MUST follow this sequence:

```
no match peer 10.0.0.1
match peer 2a01::1
```

Otherwise, both IPv4/IPv6 values are set/compiled, thus when printing the
configuration in show running, we see the first one (IPv4).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agozebra: fix mpls command 16019/head
anlan_cs [Thu, 16 May 2024 08:44:45 +0000 (16:44 +0800)]
zebra: fix mpls command

Configured with "mpls label bind 1.1.1.1/32 explicit-null", the running
configuration is:
```
!
mpls label bind 1.1.1.1/32 IPv4 Explicit Null
!
```

After this commit, the running configuration is:
```
!
mpls label bind 1.1.1.1/32 explicit-null
!
```

And add the support for the "no" form:
```
anlan(config)# mpls label bind 1.1.1.1/32 explicit-null
anlan(config)# no mpls label bind 1.1.1.1/32 explicit-null
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
11 months agoMerge pull request #16014 from pguibert6WIND/nexthop_rework
Donatas Abraitis [Thu, 16 May 2024 15:10:46 +0000 (18:10 +0300)]
Merge pull request #16014 from pguibert6WIND/nexthop_rework

Nexthop display rework

11 months agobgpd: fix dynamic peer graceful restart race condition 16020/head
Louis Scalbert [Thu, 16 May 2024 13:08:09 +0000 (15:08 +0200)]
bgpd: fix dynamic peer graceful restart race condition

bgp_llgr topotest sometimes fails at step 8:

> topo: STEP 8: 'Check if we can see 172.16.1.2/32 after R4 (dynamic peer) was killed'

R4 neighbor is deleted on R2 because it fails to re-connect:

> 14:33:40.128048 BGP: [HKWM3-ZC5QP] 192.168.3.1 fd -1 went from Established to Clearing
> 14:33:40.128154 BGP: [MJ1TJ-HEE3V] 192.168.3.1(r4) graceful restart timer expired
> 14:33:40.128158 BGP: [ZTA2J-YRKGY] 192.168.3.1(r4) graceful restart stalepath timer stopped
> 14:33:40.128162 BGP: [H917J-25EWN] 192.168.3.1(r4) Long-lived stale timer (IPv4 Unicast) started for 20 sec
> 14:33:40.128168 BGP: [H5X66-NXP9S] 192.168.3.1(r4) Long-lived set stale community (LLGR_STALE) for: 172.16.1.2/32
> 14:33:40.128220 BGP: [H5X66-NXP9S] 192.168.3.1(r4) Long-lived set stale community (LLGR_STALE) for: 192.168.3.0/24
> [...]
> 14:33:41.138869 BGP: [RGGAC-RJ6WG] 192.168.3.1 [Event] Connect failed 111(Connection refused)
> 14:33:41.138906 BGP: [ZWCSR-M7FG9] 192.168.3.1 [FSM] TCP_connection_open_failed (Connect->Active), fd 23
> 14:33:41.138912 BGP: [JA9RP-HSD1K] 192.168.3.1 (dynamic neighbor) deleted (bgp_connect_fail)
> 14:33:41.139126 BGP: [P98A2-2RDFE] 192.168.3.1(r4) graceful restart stalepath timer stopped

af8496af08 ("bgpd: Do not delete BGP dynamic peers if graceful restart
kicks in") forgot to modify bgp_connect_fail()

Do not delete the peer in bgp_connect_fail() if Non-Stop-Forwarding is
in progress.

Fixes: af8496af08 ("bgpd: Do not delete BGP dynamic peers if graceful restart kicks in")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
11 months agozebra: Update Zebra for DPDK >=22.11 API 16001/head
EasyNetDev [Mon, 13 May 2024 14:30:45 +0000 (17:30 +0300)]
zebra: Update Zebra for DPDK >=22.11 API

* Starting from version DPDK 22.11 we have API changes:
The rte_driver and rte_device objects are now opaque and must be manipulated through added accessors.

We need to update Zebra DPDK sources to DPDK version >=22.11

* Fix clang-format

Signed-off-by: EasyNet <devel@easynet.dev>
11 months agozebra: fix dump SR-TE information if available 16014/head
Philippe Guibert [Wed, 15 May 2024 13:36:04 +0000 (15:36 +0200)]
zebra: fix dump SR-TE information if available

The SR-TE color of nexthop should be displayed in all situations.

Fixes: 553c8048460a ("zebra: fix JSON fields for 'show ip/ipv6 nht'")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
11 months agozebra, lib: move nexthop display helper to lib folder
Philippe Guibert [Wed, 3 Jan 2024 20:33:58 +0000 (21:33 +0100)]
zebra, lib: move nexthop display helper to lib folder

The zebra_nexthop_vty_helper() and zebra_nexthop_json_helper()
functions could be very helpful to display nexthop information
from whatever daemon.

Move the core function in the nexthop_vty_helper() and the
nexthop_json_helper() function. The zebra API call remains
unchanged.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
11 months agoMerge pull request #16008 from mjstapp/show_routemap_source
Russ White [Wed, 15 May 2024 10:18:41 +0000 (06:18 -0400)]
Merge pull request #16008 from mjstapp/show_routemap_source

zebra: include route source set by route-map in show output

11 months agotests: improve the grpc query client and topotest 16012/head
Christian Hopps [Wed, 15 May 2024 03:36:38 +0000 (23:36 -0400)]
tests: improve the grpc query client and topotest

- Add separate get, get-config, get-state operations to query command, as
well as switching default output to JSON.
- Add an `--xml` to change the output format.
- move printss to logging.debug so output is a machine parseable result.

Signed-off-by: Christian Hopps <chopps@labn.net>
11 months agoMerge pull request #16006 from pguibert6WIND/fix_colored_nexthop_2
Russ White [Tue, 14 May 2024 20:28:31 +0000 (16:28 -0400)]
Merge pull request #16006 from pguibert6WIND/fix_colored_nexthop_2

bgpd: fix colored routes not installed after a switchover

11 months agoMerge pull request #15876 from opensourcerouting/typesafe-expand
Mark Stapp [Tue, 14 May 2024 19:16:42 +0000 (15:16 -0400)]
Merge pull request #15876 from opensourcerouting/typesafe-expand

python: add tool to expand typesafe definitions

11 months agoMerge pull request #15973 from piotrsuchy/json_ip_access
Russ White [Tue, 14 May 2024 16:08:50 +0000 (12:08 -0400)]
Merge pull request #15973 from piotrsuchy/json_ip_access

lib, vtysh: fix 'show ip[v6] access-list ... json' formatting

11 months agoMerge pull request #16007 from pguibert6WIND/fix_bmp_experimental
Russ White [Tue, 14 May 2024 16:08:09 +0000 (12:08 -0400)]
Merge pull request #16007 from pguibert6WIND/fix_bmp_experimental

bgpd: fixes bmp stats send-experimental configuration

11 months agozebra: fix wrong fpm packet header 16009/head
anlan_cs [Tue, 14 May 2024 15:25:32 +0000 (23:25 +0800)]
zebra: fix wrong fpm packet header

Signed-off-by: anlan_cs <anlan_cs@tom.com>
11 months agozebra: include route source set by route-map in show output 16008/head
Mark Stapp [Tue, 14 May 2024 14:28:17 +0000 (10:28 -0400)]
zebra: include route source set by route-map in show output

Include the prefix source address when set by a route-map in
show output for routes, in various formats.
Add some debugs when encoding netlink route messages with
a source address.

Signed-off-by: Mark Stapp <mjs@cisco.com>
11 months agobgpd: fixes bmp stats send-experimental configuration 16007/head
Philippe Guibert [Tue, 14 May 2024 12:52:23 +0000 (14:52 +0200)]
bgpd: fixes bmp stats send-experimental configuration

Unconfiguring the send-experimental stats in BMP has no effect
on the current behavior.

Fixes this by swapping the configuration boolean.

Fixes: 7ba991cf963f ("bgpd: add 'bmp stat send-experimental' command")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
11 months agobgpd: fix colored routes not installed after a switchover 16006/head
Philippe Guibert [Tue, 14 May 2024 09:51:50 +0000 (11:51 +0200)]
bgpd: fix colored routes not installed after a switchover

On a multihomed setup with colored bgp updates, when the primary
PE goes offline, only a small subset of colored bgp routes are
not switching to the secondary pe.

When a switchover happens, due to a remote IP becoming unreachable,
some nexthop tracking down notifications are sent, but those messages
are completely ignored for colored bgp updates.

The original code has been thought for mounting up the SR-TE service,
when IP reachability is ok, but not when services goes offline.

Fix this by extending the down notification mechanism for colored routes
too.

Fixes: 545aeef1d13e ("bgpd: extend the NHT code to understand SR-TE colors")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
11 months agolib, vtysh, topotests: fix 'show ip[v6] access-list ... json' formatting 15973/head
Piotr Suchy [Wed, 8 May 2024 21:04:04 +0000 (21:04 +0000)]
lib, vtysh, topotests: fix 'show ip[v6] access-list ... json' formatting

Similarly to recently fixed 'show ip[v6] prefix-list ...' - PR#15750,
json output is not valid for 'show ip[v6] access-list ... json' commands,
as it goes through all the running daemons and for each one it calls
'filter_show' creating a new json object. To aggreagate the output
and create a valid json that can later be parsed, the commands were
moved to vtysh and formatted accordingly

Signed-off-by: Piotr Suchy <piotrsuchy@proton.me>
11 months agoMerge pull request #16003 from pguibert6WIND/fix_colored_nexthop
Russ White [Mon, 13 May 2024 19:31:44 +0000 (15:31 -0400)]
Merge pull request #16003 from pguibert6WIND/fix_colored_nexthop

bgpd: fix colored nexthops resolution

11 months agoMerge pull request #15911 from opensourcerouting/feature/bgpd_dampening_per_neighbor
Russ White [Mon, 13 May 2024 17:55:24 +0000 (13:55 -0400)]
Merge pull request #15911 from opensourcerouting/feature/bgpd_dampening_per_neighbor

bgpd: per-neighbor dampening support

11 months agobgpd: fix colored nexthops resolution 16003/head
Philippe Guibert [Mon, 13 May 2024 15:42:30 +0000 (17:42 +0200)]
bgpd: fix colored nexthops resolution

When the SR-TE service is off, colored BGP routes are not
selected if it is recursively resolved over routes that are
colored only.

Actually, a BGP nexthop context includes the color attribute;
when an update from ZEBRA is received, there is no color, and
the colored BGP nexthop contexts are parsed, only if there
is a non colored BGP nexthop context. The actual setup shows
this may not be the case every time.

Fix this by parsing all the colored BGP nexthop contexts.

Fixes: b8210849b8ac ("bgpd: Make bgp ready to remove distinction between 2 nh tracking types")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
11 months agoMerge pull request #15961 from opensourcerouting/fix/allow_using_match_tag_0
Donald Sharp [Mon, 13 May 2024 13:59:36 +0000 (09:59 -0400)]
Merge pull request #15961 from opensourcerouting/fix/allow_using_match_tag_0

lib: Allow doing match/set tag untagged

11 months agoMerge pull request #15655 from idryzhov/isis-fix-subtlv-bit
Donatas Abraitis [Mon, 13 May 2024 08:10:38 +0000 (11:10 +0300)]
Merge pull request #15655 from idryzhov/isis-fix-subtlv-bit

isisd: fix ip/ipv6 reachability tlvs

11 months agoMerge pull request #15968 from donaldsharp/parse_attr_problems
Donatas Abraitis [Sat, 11 May 2024 11:44:29 +0000 (14:44 +0300)]
Merge pull request #15968 from donaldsharp/parse_attr_problems

Parse attr problems

11 months agoMerge pull request #15614 from louis-6wind/fix-6pe-address
Donatas Abraitis [Fri, 10 May 2024 19:55:12 +0000 (22:55 +0300)]
Merge pull request #15614 from louis-6wind/fix-6pe-address

bgpd: fix ipv4-mapped ipv6 on non 6pe

11 months ago*: Modify agentx to be allowed to be called 15980/head
Donald Sharp [Thu, 9 May 2024 11:47:29 +0000 (07:47 -0400)]
*: Modify agentx to be allowed to be called

If you had a situation where an operator turned on
ospfd with snmp but not ospf6d and agentx was configured
then you get into a situation where ospf6d would complain
that the config for agentx did not exist.  Let's modify
the code to allow this situation to happen.

Fixes: #15896
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agoMerge pull request #15976 from opensourcerouting/build-more-xref-setup
Christian Hopps [Fri, 10 May 2024 14:14:44 +0000 (10:14 -0400)]
Merge pull request #15976 from opensourcerouting/build-more-xref-setup

build: throw in a few more `XREF_SETUP`

11 months agotests: Check if `set/match tag untagged` works 15961/head
Donatas Abraitis [Fri, 10 May 2024 07:21:54 +0000 (10:21 +0300)]
tests: Check if `set/match tag untagged` works

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agolib: Allow doing match/set tag untagged
Donatas Abraitis [Wed, 8 May 2024 19:25:38 +0000 (22:25 +0300)]
lib: Allow doing match/set tag untagged

In route-map: `match tag untagged`.

E.g. Cisco/Juniper allows that, but they use `match tag 0` instead.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agoMerge pull request #15986 from mjstapp/more_rtas
Jafar Al-Gharaibeh [Fri, 10 May 2024 06:22:27 +0000 (01:22 -0500)]
Merge pull request #15986 from mjstapp/more_rtas

zebra: add some more netlink RTA_ strings

11 months agozebra: add some more netlink RTA_ strings 15986/head
Mark Stapp [Thu, 9 May 2024 20:56:07 +0000 (16:56 -0400)]
zebra: add some more netlink RTA_ strings

Add a few more RTA_ attribute names to the netlink debug
output.

Signed-off-by: Mark Stapp <mjs@cisco.com>
11 months agoMerge pull request #15974 from LabNConsulting/chopps/add-notify-diag
Jafar Al-Gharaibeh [Thu, 9 May 2024 17:02:24 +0000 (12:02 -0500)]
Merge pull request #15974 from LabNConsulting/chopps/add-notify-diag

mgmtd: add missing diagnostic show cmd output (notify maps)

11 months agobuild: throw in a few more `XREF_SETUP` 15976/head
David Lamparter [Thu, 9 May 2024 05:22:08 +0000 (07:22 +0200)]
build: throw in a few more `XREF_SETUP`

This really should be all of them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 months agozebra: Ensure multipath encodes vxlan right for fpm usage 15968/head
Donald Sharp [Wed, 8 May 2024 16:52:12 +0000 (12:52 -0400)]
zebra: Ensure multipath encodes vxlan right for fpm usage

The fpm code path for the dplane_fpm_nl module was improperly
encoding the multipath nexthop data for vxlan type routes.
Move this into the embedded nexthop encoding where it belongs.

This change makes it so that the usage of `-M dplane_fpm_nl`
is now producing the same netlink messages that `-M fpm`
produces when using vxlan based nexthops.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agozebra: Move fpm check to inside of netlink_route_nexthop_encap
Donald Sharp [Wed, 8 May 2024 16:48:12 +0000 (12:48 -0400)]
zebra: Move fpm check to inside of netlink_route_nexthop_encap

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agozebra: Move netlink_route_nexthop_encap
Donald Sharp [Wed, 8 May 2024 16:46:08 +0000 (12:46 -0400)]
zebra: Move netlink_route_nexthop_encap

Move this static function earlier so we can avoid
a predecleartion.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agozebra: Add 2 things to fpm_listener
Donald Sharp [Fri, 3 May 2024 15:59:02 +0000 (11:59 -0400)]
zebra: Add 2 things to fpm_listener

1) Add ability to hex-dump the received packet for debugging
2) Receive encap type and vxlan vni and display them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agoMerge pull request #15975 from opensourcerouting/pim-fixes-20240508
Jafar Al-Gharaibeh [Thu, 9 May 2024 13:52:11 +0000 (08:52 -0500)]
Merge pull request #15975 from opensourcerouting/pim-fixes-20240508

pimd: fixes split off from #15969

11 months agoMerge pull request #15977 from LabNConsulting/chopps/key-test-fix
Donald Sharp [Thu, 9 May 2024 11:57:40 +0000 (07:57 -0400)]
Merge pull request #15977 from LabNConsulting/chopps/key-test-fix

tests: fix mis-spelled `cryptographic-algorithm` keyword in test

11 months agoMerge pull request #15965 from cscarpitta/bugfix/bgp-srv6-memleaks
Donald Sharp [Thu, 9 May 2024 11:11:56 +0000 (07:11 -0400)]
Merge pull request #15965 from cscarpitta/bugfix/bgp-srv6-memleaks

bgpd: Fix SRv6 memory leaks spotted by Address Sanitizer

11 months agoMerge pull request #15967 from opensourcerouting/fix/drop_redundand_variable
Donald Sharp [Thu, 9 May 2024 11:11:01 +0000 (07:11 -0400)]
Merge pull request #15967 from opensourcerouting/fix/drop_redundand_variable

bgpd: Remove redundant recursion flag variable

11 months agoMerge pull request #15972 from opensourcerouting/clang-ignore-defuns
Donald Sharp [Thu, 9 May 2024 11:09:48 +0000 (07:09 -0400)]
Merge pull request #15972 from opensourcerouting/clang-ignore-defuns

build: make clang-format ignore DEFUN/DEFPY

11 months agotests: fix mis-spelled `cryptographic-algorithm` keyword in test 15977/head
Christian Hopps [Thu, 9 May 2024 08:19:44 +0000 (04:19 -0400)]
tests: fix mis-spelled `cryptographic-algorithm` keyword in test

Also update to use a newer hashing function while we are here.

fixes #15923

Signed-off-by: Christian Hopps <chopps@labn.net>
11 months agobgpd: Move SRv6 cleanup functions 15965/head
Carmine Scarpitta [Wed, 8 May 2024 07:48:55 +0000 (09:48 +0200)]
bgpd: Move SRv6 cleanup functions

Move SRv6 cleanup operations to `bgp_srv6_cleanup` function.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
11 months agobgpd: Fix SRv6 memory leaks spotted by ASAN
Carmine Scarpitta [Wed, 8 May 2024 07:45:56 +0000 (09:45 +0200)]
bgpd: Fix SRv6 memory leaks spotted by ASAN

Fix a couple of memory leaks spotted by Address Sanitizer:

```

=================================================================
==970960==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 592 byte(s) in 2 object(s) allocated from:
    #0 0xfeb98b28a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xfeb98ae572f8 in qcalloc lib/memory.c:105
    #2 0xfeb98ae76138 in srv6_locator_chunk_alloc lib/srv6.c:138
    #3 0xb7f3c8508fa0 in ensure_vrf_tovpn_sid_per_vrf bgpd/bgp_mplsvpn.c:831
    #4 0xb7f3c8509494 in ensure_vrf_tovpn_sid bgpd/bgp_mplsvpn.c:866
    #5 0xb7f3c85028a8 in vpn_leak_postchange bgpd/bgp_mplsvpn.h:289
    #6 0xb7f3c851a7c0 in vpn_leak_postchange_all bgpd/bgp_mplsvpn.c:3769
    #7 0xb7f3c86f6ef0 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3378
    #8 0xfeb98afa6e14 in zclient_read lib/zclient.c:4608
    #9 0xfeb98af3d684 in event_call lib/event.c:2011
    #10 0xfeb98ae2788c in frr_run lib/libfrr.c:1217
    #11 0xb7f3c83cbf0c in main bgpd/bgp_main.c:545
    #12 0xfeb98a8973f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0xfeb98a8974c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0xb7f3c83c832c in _start (/usr/lib/frr/bgpd+0x2d832c)

Direct leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0xfeb98b28a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xfeb98ae572f8 in qcalloc lib/memory.c:105
    #2 0xb7f3c8508fd8 in ensure_vrf_tovpn_sid_per_vrf bgpd/bgp_mplsvpn.c:832
    #3 0xb7f3c8509494 in ensure_vrf_tovpn_sid bgpd/bgp_mplsvpn.c:866
    #4 0xb7f3c85028a8 in vpn_leak_postchange bgpd/bgp_mplsvpn.h:289
    #5 0xb7f3c851a7c0 in vpn_leak_postchange_all bgpd/bgp_mplsvpn.c:3769
    #6 0xb7f3c86f6ef0 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3378
    #7 0xfeb98afa6e14 in zclient_read lib/zclient.c:4608
    #8 0xfeb98af3d684 in event_call lib/event.c:2011
    #9 0xfeb98ae2788c in frr_run lib/libfrr.c:1217
    #10 0xb7f3c83cbf0c in main bgpd/bgp_main.c:545
    #11 0xfeb98a8973f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #12 0xfeb98a8974c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #13 0xb7f3c83c832c in _start (/usr/lib/frr/bgpd+0x2d832c)

Direct leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0xfeb98b28a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xfeb98ae572f8 in qcalloc lib/memory.c:105
    #2 0xb7f3c8506520 in vpn_leak_zebra_vrf_sid_update_per_vrf bgpd/bgp_mplsvpn.c:439
    #3 0xb7f3c85068d8 in vpn_leak_zebra_vrf_sid_update bgpd/bgp_mplsvpn.c:459
    #4 0xb7f3c86f6aec in bgp_ifp_create bgpd/bgp_zebra.c:3345
    #5 0xfeb98adfd3f8 in hook_call_if_real lib/if.c:48
    #6 0xfeb98adfe750 in if_new_via_zapi lib/if.c:181
    #7 0xfeb98af98084 in zclient_interface_add lib/zclient.c:2592
    #8 0xfeb98afa6d24 in zclient_read lib/zclient.c:4606
    #9 0xfeb98af3d684 in event_call lib/event.c:2011
    #10 0xfeb98ae2788c in frr_run lib/libfrr.c:1217
    #11 0xb7f3c83cbf0c in main bgpd/bgp_main.c:545
    #12 0xfeb98a8973f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0xfeb98a8974c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0xb7f3c83c832c in _start (/usr/lib/frr/bgpd+0x2d832c)

SUMMARY: AddressSanitizer: 656 byte(s) leaked in 6 allocation(s).

```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
11 months agomgmtd: add missing diagnostic show cmd output (notify maps) 15974/head
Christian Hopps [Thu, 9 May 2024 04:15:58 +0000 (00:15 -0400)]
mgmtd: add missing diagnostic show cmd output (notify maps)

- also add missing rpc client accounting bug in same diagnostic command.

Signed-off-by: Christian Hopps <chopps@labn.net>
11 months agobuild: make clang-format ignore DEFUN/DEFPY 15972/head
David Lamparter [Wed, 8 May 2024 19:47:14 +0000 (21:47 +0200)]
build: make clang-format ignore DEFUN/DEFPY

This makes clang-format not wreck all our hand-formatted DEFUN/DEFPY
statements.  We apparently missed this option when we originally looked
at setting up the .clang-format control file...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 months agoMerge pull request #15920 from chiragshah6/fdev2
Donatas Abraitis [Wed, 8 May 2024 19:36:58 +0000 (22:36 +0300)]
Merge pull request #15920 from chiragshah6/fdev2

zebra: fix EVPN svd based remote nh neigh del

11 months agopimd: fix order of operations for evaluating join 15975/head
David Lamparter [Mon, 12 Dec 2022 16:50:59 +0000 (17:50 +0100)]
pimd: fix order of operations for evaluating join

join_desired looks at whether up->channel_oil is empty.  up->channel_oil
is updated from pim_forward_stop(), calling pim_channel_del_oif().  But
that was being called *after* updating join_desired, so join_desired saw
a non-empty OIL.  Pull up the pim_forward_stop() call to before updating
join_desired.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 months agopimd: fix null register before aging out reg-stop
David Lamparter [Mon, 17 Apr 2023 09:47:08 +0000 (11:47 +0200)]
pimd: fix null register before aging out reg-stop

It looks like the code was trying to do this with the null_register
parameter on pim_upstream_start_register_stop_timer(), but that didn't
quite work right.  Restructure a bit to get it right.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 months agopimd: fix dr-priority range
David Lamparter [Fri, 14 Apr 2023 15:17:27 +0000 (17:17 +0200)]
pimd: fix dr-priority range

0 is a valid DR priority.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 months agoMerge pull request #15946 from LabNConsulting/chopps/rpc-cleanup
Mark Stapp [Wed, 8 May 2024 15:14:55 +0000 (11:14 -0400)]
Merge pull request #15946 from LabNConsulting/chopps/rpc-cleanup

mgmtd RPC minor cleanup

11 months agobgpd: Remove redundant recursion flag variable 15967/head
Donatas Abraitis [Wed, 8 May 2024 14:02:15 +0000 (17:02 +0300)]
bgpd: Remove redundant recursion flag variable

Reuse an existing one.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agoMerge pull request #15962 from opensourcerouting/zmq-xref-setup
Donald Sharp [Wed, 8 May 2024 13:56:12 +0000 (09:56 -0400)]
Merge pull request #15962 from opensourcerouting/zmq-xref-setup

lib: stick `XREF_SETUP` into libfrrzmq

11 months agoMerge pull request #15942 from anlancs/isisd/doc-flex
Russ White [Wed, 8 May 2024 12:35:42 +0000 (08:35 -0400)]
Merge pull request #15942 from anlancs/isisd/doc-flex

doc: fix one command for isis

11 months agoMerge pull request #15950 from mxyns/draft-bmp-peer-up
Donatas Abraitis [Wed, 8 May 2024 11:50:26 +0000 (14:50 +0300)]
Merge pull request #15950 from mxyns/draft-bmp-peer-up

bgpd: bmp rename tlv types

11 months agoMerge pull request #15608 from vjardin/libyang3
Martin Winter [Wed, 8 May 2024 10:48:03 +0000 (12:48 +0200)]
Merge pull request #15608 from vjardin/libyang3

libyang3 - fondation step 1

11 months agodebian: libyang3 15608/head
Vincent JARDIN [Fri, 3 May 2024 17:01:27 +0000 (19:01 +0200)]
debian: libyang3

libyang3-dev is required.

TODO: add redhat, snapcraft

Suggested-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
11 months agolib: libyang.so.3 compatibilty layers
Vincent JARDIN [Sun, 7 Apr 2024 10:27:20 +0000 (12:27 +0200)]
lib: libyang.so.3 compatibilty layers

Let's support libyang 2.2.8 using libyang.so.3.0.8
It requires the commit ed277585ea from the libyang.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
11 months agolib: stick `XREF_SETUP` into libfrrzmq 15962/head
David Lamparter [Tue, 7 May 2024 21:07:42 +0000 (23:07 +0200)]
lib: stick `XREF_SETUP` into libfrrzmq

Didn't catch this one when adding the warning/error (with -Werror) for
missing this.  Neither the CI nor I build with ZeroMQ enabled :(.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 months agoMerge pull request #15885 from opensourcerouting/gcc-unrecognized-ms-anon-tag
Donald Sharp [Tue, 7 May 2024 20:00:53 +0000 (16:00 -0400)]
Merge pull request #15885 from opensourcerouting/gcc-unrecognized-ms-anon-tag

build: get rid of "unrecognized … anon-tag"

11 months agoMerge pull request #15947 from anlancs/isisd/fix-lsp-json
Russ White [Tue, 7 May 2024 15:29:46 +0000 (11:29 -0400)]
Merge pull request #15947 from anlancs/isisd/fix-lsp-json

isisd: fix json display for database command

11 months agoMerge pull request #15627 from Max-Mustermann33/ospf6d_metric_for_type5_lsa
Russ White [Tue, 7 May 2024 15:01:12 +0000 (11:01 -0400)]
Merge pull request #15627 from Max-Mustermann33/ospf6d_metric_for_type5_lsa

ospf6d: Fix metric when sending AS-external LSAs

11 months agoMerge pull request #15922 from anlancs/isisd/fix-unnecessary-check-vrf-cleanup
Russ White [Tue, 7 May 2024 15:00:14 +0000 (11:00 -0400)]
Merge pull request #15922 from anlancs/isisd/fix-unnecessary-check-vrf-cleanup

isisd: remove unnecessary checkings for vrf

11 months agoMerge pull request #15944 from lsang6WIND/fix-same-prefix
Russ White [Tue, 7 May 2024 14:57:56 +0000 (10:57 -0400)]
Merge pull request #15944 from lsang6WIND/fix-same-prefix

if: fix same connected address

11 months agoMerge pull request #15945 from anlancs/isisd/fix-topology-algorithm-show
Russ White [Tue, 7 May 2024 14:57:33 +0000 (10:57 -0400)]
Merge pull request #15945 from anlancs/isisd/fix-topology-algorithm-show

isisd: fix the display topology command

11 months agomgmtd: some cleanup from original RPC commit 15946/head
Christian Hopps [Tue, 7 May 2024 02:40:27 +0000 (02:40 +0000)]
mgmtd: some cleanup from original RPC commit

- Fix memleak on multiple errstr returns (multiple clients) Allow the
- multiple clients to all return results and merge them (as with other
  operations like get tree).

Signed-off-by: Christian Hopps <chopps@labn.net>
11 months agoMerge pull request #15913 from opensourcerouting/fix/bgpd_no_set_as_prepend
Russ White [Tue, 7 May 2024 14:51:48 +0000 (10:51 -0400)]
Merge pull request #15913 from opensourcerouting/fix/bgpd_no_set_as_prepend

bgpd: Fix `no set as-path prepend ASNUM...`

11 months agoMerge pull request #15899 from gromit1811/ospf6_ecmp_inter_area_bugfix_15777_pr
Russ White [Tue, 7 May 2024 14:48:32 +0000 (10:48 -0400)]
Merge pull request #15899 from gromit1811/ospf6_ecmp_inter_area_bugfix_15777_pr

ospf6d: Fix nexthop computation for inter-area multi-ABR ECMP

11 months agoMerge pull request #15895 from opensourcerouting/fix/ignore_attributes_if_discard_is_...
Russ White [Tue, 7 May 2024 14:44:38 +0000 (10:44 -0400)]
Merge pull request #15895 from opensourcerouting/fix/ignore_attributes_if_discard_is_configured

bgpd: Ignore validating the attribute flags if path-attribute is configured

11 months agodoc: fix one command for isis 15942/head
anlan_cs [Mon, 6 May 2024 12:38:57 +0000 (20:38 +0800)]
doc: fix one command for isis

Correct one command for isis based on code. And better the web page.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
11 months agoMerge pull request #15846 from Shbinging/fix_ip_ospf_dead_interval_fast_hello
Russ White [Tue, 7 May 2024 13:58:29 +0000 (09:58 -0400)]
Merge pull request #15846 from Shbinging/fix_ip_ospf_dead_interval_fast_hello

ospfd: fix the bug where ip_ospf_dead-interval_minimal_hello-multiplier did not reset hello timer

11 months agoMerge pull request #15883 from opensourcerouting/fix/bgpd_gr_fsm
Russ White [Tue, 7 May 2024 13:56:51 +0000 (09:56 -0400)]
Merge pull request #15883 from opensourcerouting/fix/bgpd_gr_fsm

bgpd: Apply NOOP when doing negative commands for GR operations

11 months agobgpd: bmp rename tlv types 15950/head
Maxence Younsi [Tue, 7 May 2024 11:15:31 +0000 (13:15 +0200)]
bgpd: bmp rename tlv types

renamed BMP_INFO_TYPE_SYSDESCR to BMP_INIT_INFO_TYPE_SYSDESCR
renamed BMP_INFO_TYPE_SYSNAME to BMP_INIT_INFO_TYPE_SYSNAME
added BMP_PEERUP_INFO_STRING

Signed-off-by: Maxou <maxence.younsi@insa-lyon.fr>
11 months agoisisd: fix json display for database command 15947/head
anlan_cs [Tue, 7 May 2024 02:16:00 +0000 (10:16 +0800)]
isisd: fix json display for database command

The current json display lost a lot of LSPs, added them.

Fixed the json format for two commands:
"show isis database detail json"
"show isis database json"

Signed-off-by: anlan_cs <anlan_cs@tom.com>
11 months agomgmtd: rpc and action handling both should use rpc map.
Christian Hopps [Tue, 7 May 2024 02:37:52 +0000 (02:37 +0000)]
mgmtd: rpc and action handling both should use rpc map.

The previous idea of using config xpath registrations for actions b/c
the config is the subject of the action is sub-optimal. It splits
handling of YANG "actions" (Action and RPCs) between 2 different
registartion maps for the same category of functionality.

Signed-off-by: Christian Hopps <chopps@labn.net>