Commit Graph

35546 Commits

Author SHA1 Message Date
Louis Scalbert
c2058bb0a0 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>
2024-05-22 13:41:08 +02:00
Louis Scalbert
4d0e9e2a9f 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>
2024-05-22 13:37:56 +02:00
Russ White
4bd16486e9
Merge pull request #16032 from Pdoijode/pdoijode/zebra-rt-deny-fix
zebra: Deny the routes if ip protocol CLI refers to an undefined rmap
2024-05-21 10:52:52 -04:00
Russ White
c002c5c4c9
Merge pull request #16052 from donaldsharp/show_ip_route_summary
Show ip route summary
2024-05-20 17:39:21 -04:00
Russ White
c7b496e553
Merge pull request #16037 from zhou-run/202405111552
isisd: fix crash when configuring the circuit type for the interface.
2024-05-20 17:35:54 -04:00
Pooja Jagadeesh Doijode
705e8ef78f 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 fd303a4ba1.

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>
2024-05-20 12:50:18 -07:00
Donald Sharp
d284e22296 doc: Add missing show ip route summ command
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-20 15:46:29 -04:00
Donald Sharp
31da224cdf 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>
2024-05-20 15:44:00 -04:00
Donatas Abraitis
b87d5a467e
Merge pull request #15980 from donaldsharp/agentx_update
*: Modify agentx to be allowed to be called
2024-05-20 22:33:01 +03:00
Donald Sharp
0babb933e7
Merge pull request #16022 from opensourcerouting/fix/match_peer
bgpd: Fix `match peer` when switching between IPv4/IPv6/interface
2024-05-20 09:57:20 -04:00
Donald Sharp
815e40c0c1
Merge pull request #16033 from opensourcerouting/fix/typo_soft_version_capability
bgpd: Fix logging message when receiving a software version capability
2024-05-20 09:45:41 -04:00
Donatas Abraitis
95b1b1d3e3
Merge pull request #16035 from raja-rajasekar/rajasekarr/backpressure_infinite_loop
bgpd: backpressure - Fix to avoid CPU hog
2024-05-20 09:54:04 +03:00
Donatas Abraitis
4b6e5408a0
Merge pull request #16034 from raja-rajasekar/rajasekarr/backpressure_l3_evpn_fix
bgpd: backpressure - Fix to withdraw evpn type-5 routes immediately
2024-05-20 09:50:55 +03:00
Donatas Abraitis
4769239967
Merge pull request #16019 from anlancs/ldpd/fix-cmd-1
zebra: fix mpls command
2024-05-18 16:11:39 +03:00
Donatas Abraitis
815b1d0e58
Merge pull request #16009 from anlancs/zebra/fix-fpm-nl
zebra: fix wrong fpm packet header
2024-05-18 16:11:10 +03:00
zhou-run
fdcd6749a2
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>
2024-05-18 11:13:35 +08:00
Rajasekar Raja
920bf45e10 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>
2024-05-17 15:43:59 -07:00
Rajasekar Raja
f4ba47238e 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>
2024-05-17 12:42:30 -07:00
Donatas Abraitis
d50730ba48 bgpd: Fix logging message when receiving a software version capability
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-17 22:04:40 +03:00
Donald Sharp
e41b4a755e
Merge pull request #16012 from LabNConsulting/chopps/improve-grpc-test
tests: improve the grpc query client and topotest
2024-05-17 11:48:27 -04:00
Donald Sharp
e3fceef597
Merge pull request #16001 from EasyNetDev/dpdk->=22.11-API-fix
zebra: Update Zebra DPDK >=22.11 API
2024-05-17 09:41:59 -04:00
Donald Sharp
71a70ba2ba
Merge pull request #16024 from LabNConsulting/chopps/grpc-unit-test-fix
tests: embed YANG in mgmtd unit-test bin
2024-05-17 07:23:39 -04:00
Donatas Abraitis
5dcb1880b6
Merge pull request #16020 from louis-6wind/fix-bgp-llgr
bgpd: fix dynamic peer graceful restart race condition
2024-05-17 09:39:51 +03:00
Christian Hopps
07a084f921 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>
2024-05-17 00:54:20 -04:00
Donatas Abraitis
edfc03614f 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>
2024-05-16 20:49:56 +03:00
anlan_cs
05ad3ccb03 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>
2024-05-16 23:30:41 +08:00
Donatas Abraitis
03e3da09a8
Merge pull request #16014 from pguibert6WIND/nexthop_rework
Nexthop display rework
2024-05-16 18:10:46 +03:00
Louis Scalbert
e446308d76 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>
2024-05-16 15:19:11 +02:00
EasyNetDev
0e040960d7
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>
2024-05-16 14:26:26 +03:00
Philippe Guibert
4648225b53 zebra: fix dump SR-TE information if available
The SR-TE color of nexthop should be displayed in all situations.

Fixes: 553c804846 ("zebra: fix JSON fields for 'show ip/ipv6 nht'")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-05-15 15:45:33 +02:00
Philippe Guibert
05b6cfc71a 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>
2024-05-15 15:33:52 +02:00
Russ White
db1e2a094d
Merge pull request #16008 from mjstapp/show_routemap_source
zebra: include route source set by route-map in show output
2024-05-15 06:18:41 -04:00
Christian Hopps
9dc02dd338 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>
2024-05-15 00:16:33 -04:00
Russ White
93b68f6128
Merge pull request #16006 from pguibert6WIND/fix_colored_nexthop_2
bgpd: fix colored routes not installed after a switchover
2024-05-14 16:28:31 -04:00
Mark Stapp
a243fc2206
Merge pull request #15876 from opensourcerouting/typesafe-expand
python: add tool to expand typesafe definitions
2024-05-14 15:16:42 -04:00
Russ White
94d0128938
Merge pull request #15973 from piotrsuchy/json_ip_access
lib, vtysh: fix 'show ip[v6] access-list ... json' formatting
2024-05-14 12:08:50 -04:00
Russ White
4ed691df30
Merge pull request #16007 from pguibert6WIND/fix_bmp_experimental
bgpd: fixes bmp stats send-experimental configuration
2024-05-14 12:08:09 -04:00
anlan_cs
2429dd130f zebra: fix wrong fpm packet header
Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-05-14 23:26:40 +08:00
Mark Stapp
d6835df9cc 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>
2024-05-14 10:28:17 -04:00
Philippe Guibert
cd001c5ac0 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: 7ba991cf96 ("bgpd: add 'bmp stat send-experimental' command")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-05-14 14:54:19 +02:00
Philippe Guibert
e265b16f83 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: 545aeef1d1 ("bgpd: extend the NHT code to understand SR-TE colors")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-05-14 13:51:24 +02:00
Piotr Suchy
70e5005cba 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>
2024-05-14 13:22:20 +02:00
Russ White
281c891f16
Merge pull request #16003 from pguibert6WIND/fix_colored_nexthop
bgpd: fix colored nexthops resolution
2024-05-13 15:31:44 -04:00
Russ White
2e0208602b
Merge pull request #15911 from opensourcerouting/feature/bgpd_dampening_per_neighbor
bgpd: per-neighbor dampening support
2024-05-13 13:55:24 -04:00
Philippe Guibert
42c497dec0 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: b8210849b8 ("bgpd: Make bgp ready to remove distinction between 2 nh tracking types")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-05-13 18:00:50 +02:00
Donald Sharp
b6f1b32c8a
Merge pull request #15961 from opensourcerouting/fix/allow_using_match_tag_0
lib: Allow doing match/set tag untagged
2024-05-13 09:59:36 -04:00
Donatas Abraitis
1b2eb32a9f
Merge pull request #15655 from idryzhov/isis-fix-subtlv-bit
isisd: fix ip/ipv6 reachability tlvs
2024-05-13 11:10:38 +03:00
Donatas Abraitis
5f8759a4aa
Merge pull request #15968 from donaldsharp/parse_attr_problems
Parse attr problems
2024-05-11 14:44:29 +03:00
Donatas Abraitis
b3600d82dc
Merge pull request #15614 from louis-6wind/fix-6pe-address
bgpd: fix ipv4-mapped ipv6 on non 6pe
2024-05-10 22:55:12 +03:00
Donald Sharp
73ad64a6f4 *: 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>
2024-05-10 10:16:29 -04:00