Commit Graph

35536 Commits

Author SHA1 Message Date
Rajesh Girada
a41b484f0a ospf6d: Handling Topo Change in GR-HELPER mode for max-age lsas
Description:
OSPF6 GR HELPER router should  consider as TOPOCHANGE when
it receives lsas with max age and should exit from Helper.
But, it is not exiting from helper because this max age lsa is
considered as duplicated lsa since the sender uses same seq
number for max age lsa from the previous lsa update.
Currently, topo change is not considered for duplicated lsas.
So removed the duplicated check when validating TOPOCHNAGE.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2024-06-06 04:34:39 -07: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
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
Christian Hopps
51119823d0
Merge pull request #15976 from opensourcerouting/build-more-xref-setup
build: throw in a few more `XREF_SETUP`
2024-05-10 10:14:44 -04:00
Donatas Abraitis
adce8e066c tests: Check if set/match tag untagged works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-05-10 10:25:26 +03:00
Donatas Abraitis
e797b137f3 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>
2024-05-10 09:50:18 +03:00
Jafar Al-Gharaibeh
c143a29b6b
Merge pull request #15986 from mjstapp/more_rtas
zebra: add some more netlink RTA_ strings
2024-05-10 01:22:27 -05:00
Mark Stapp
6afb6962be 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>
2024-05-09 16:56:07 -04:00
Jafar Al-Gharaibeh
6482d1abe6
Merge pull request #15974 from LabNConsulting/chopps/add-notify-diag
mgmtd: add missing diagnostic show cmd output (notify maps)
2024-05-09 12:02:24 -05:00
David Lamparter
d65280a9a8 build: throw in a few more XREF_SETUP
This really should be all of them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-09 18:02:49 +02:00
Donald Sharp
bd4fca132a 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>
2024-05-09 11:52:51 -04:00
Donald Sharp
569f9e4394 zebra: Move fpm check to inside of netlink_route_nexthop_encap
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-05-09 11:52:51 -04:00
Donald Sharp
ba5a3538e8 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>
2024-05-09 11:52:51 -04:00