]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 months agopbrd: initialize structs used in hash_lookup
David Lamparter [Wed, 22 Jan 2025 10:16:10 +0000 (11:16 +0100)]
pbrd: initialize structs used in hash_lookup

Doesn't seem to break anything but really poor style to pass potentially
uninitialized data to hash_lookup.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 months agofpm: guard against garbage in unused address bytes
David Lamparter [Wed, 22 Jan 2025 10:15:17 +0000 (11:15 +0100)]
fpm: guard against garbage in unused address bytes

Zero out the 12 unused bytes (for the IPv6 address) when reading in an
IPv4 address.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 months agobgpd: don't reuse nexthop variable in loop/switch
David Lamparter [Wed, 22 Jan 2025 10:13:21 +0000 (11:13 +0100)]
bgpd: don't reuse nexthop variable in loop/switch

While the loop is currently exited in all cases after using nexthop, it
is a footgun to have "nh" around to be reused in another iteration of
the loop.  This would leave nexthop with partial data from the previous
use.  Make it local where needed instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 months agoMerge pull request #17935 from mjstapp/fix_nhg_hash_equal
Donald Sharp [Wed, 29 Jan 2025 15:14:37 +0000 (10:14 -0500)]
Merge pull request #17935 from mjstapp/fix_nhg_hash_equal

zebra: include resolving nexthops in nhg hash

2 months agoMerge pull request #17946 from bobuhiro11/normalize_ebgp_multihop
Donatas Abraitis [Wed, 29 Jan 2025 12:05:12 +0000 (14:05 +0200)]
Merge pull request #17946 from bobuhiro11/normalize_ebgp_multihop

tools: Fix frr-reload for ebgp-multihop TTL reconfiguration.

2 months agotools: Fix frr-reload for ebgp-multihop TTL reconfiguration. 17946/head
Nobuhiro MIKI [Wed, 29 Jan 2025 04:31:53 +0000 (04:31 +0000)]
tools: Fix frr-reload for ebgp-multihop TTL reconfiguration.

In ebgp-multihop, there is a difference in reload behavior when TTL is
unspecified (meaning default 255) and when 255 is explicitly specified.
For example, when reloading with 'neighbor <neighbor> ebgp-multihop
255' in the config, the following difference is created. This commit
fixes that.

    Lines To Delete
    ===============
    router bgp 65001
     no neighbor 10.0.0.4 ebgp-multihop
    exit

    Lines To Add
    ============
    router bgp 65001
     neighbor 10.0.0.4 ebgp-multihop 255
    exit

The commit 767aaa3a8048 is not sufficient and frr-reload needs to be
fixed to handle both unspecified and specified cases.

Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
2 months agotests: Add a test that shows the v6 recursive nexthop problem 17935/head
Donald Sharp [Mon, 27 Jan 2025 15:34:31 +0000 (10:34 -0500)]
tests: Add a test that shows the v6 recursive nexthop problem

Currently FRR does not handle v6 recurisive resolution properly
when the route being recursed through changes and the most
significant bits of the route are not changed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 months agoMerge pull request #17941 from opensourcerouting/fix-dst-src
Russ White [Tue, 28 Jan 2025 17:23:06 +0000 (12:23 -0500)]
Merge pull request #17941 from opensourcerouting/fix-dst-src

static: fix botched staticd YANG conversion for dst-src

2 months agoMerge pull request #17802 from askorichenko/test-fix-table-map
Russ White [Tue, 28 Jan 2025 17:20:43 +0000 (12:20 -0500)]
Merge pull request #17802 from askorichenko/test-fix-table-map

bgpd: fix table-map option

2 months agoMerge pull request #17906 from LabNConsulting/aceelindem/ospf-prune-dup-next-hops
Russ White [Tue, 28 Jan 2025 17:19:07 +0000 (12:19 -0500)]
Merge pull request #17906 from LabNConsulting/aceelindem/ospf-prune-dup-next-hops

ospfd: Prune duplicate next-hop when installing into zebra route table.

2 months agoMerge pull request #17848 from pguibert6WIND/isis_srv6_topo1_ping
Russ White [Tue, 28 Jan 2025 16:49:20 +0000 (11:49 -0500)]
Merge pull request #17848 from pguibert6WIND/isis_srv6_topo1_ping

Isis srv6 topo1 ping

2 months agoMerge pull request #17924 from donaldsharp/evaluate_paths_optimization
Russ White [Tue, 28 Jan 2025 16:29:15 +0000 (11:29 -0500)]
Merge pull request #17924 from donaldsharp/evaluate_paths_optimization

bgpd: Optimize evaluate paths for a peer going down

2 months agoMerge pull request #17881 from opensourcerouting/fix/last_reset_reason
Russ White [Tue, 28 Jan 2025 15:40:50 +0000 (10:40 -0500)]
Merge pull request #17881 from opensourcerouting/fix/last_reset_reason

bgpd: last reset SNAFU

2 months agoMerge pull request #17863 from opensourcerouting/fix/bgp_coverity_1617727
Russ White [Tue, 28 Jan 2025 15:35:57 +0000 (10:35 -0500)]
Merge pull request #17863 from opensourcerouting/fix/bgp_coverity_1617727

bgpd: Check if the peer really exists before sending dynamic capability

2 months agoMerge pull request #17736 from opensourcerouting/table-direct
Russ White [Tue, 28 Jan 2025 15:24:00 +0000 (10:24 -0500)]
Merge pull request #17736 from opensourcerouting/table-direct

bgpd,lib,zebra: permit table-direct on VRFs

3 months agotopotests: test v6 & dst-src in static_simple 17941/head
David Lamparter [Mon, 27 Jan 2025 17:36:12 +0000 (18:36 +0100)]
topotests: test v6 & dst-src in static_simple

The "static_simple" test has code for testing IPv6 routes, but it wasn't
even being run (duh.)  Enable it, and also test IPv6 dst-src routes.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 months agostaticd: fix NHT for dst-src routes
David Lamparter [Mon, 27 Jan 2025 16:57:54 +0000 (17:57 +0100)]
staticd: fix NHT for dst-src routes

staticd's NHT code wasn't updating dst-src routes :(

Fixes: FRRouting/frr#14247
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 months agolib, zebra: carry source prefix in route_notify
David Lamparter [Mon, 27 Jan 2025 19:26:32 +0000 (20:26 +0100)]
lib, zebra: carry source prefix in route_notify

When a daemon wants to know about its routes, make it possible to have
that work for dst-src routes.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 months agostaticd: fix botched staticd YANG for dst-src
David Lamparter [Mon, 27 Jan 2025 17:18:24 +0000 (18:18 +0100)]
staticd: fix botched staticd YANG for dst-src

The staticd YANG conversion completely f*cked up dst-src routes.
Stupidly enough, the correct thing is much simpler as seen by the amount
of deletes in this commit.

This does, unfortunately, involve a rather annoying YANG edge case with
what should reasonably be an optional leaf as part of a list key, which
is not possible.  It uses `::/0` as unconditional filler instead, since
that is semantically correct.

The `test_yang_mgmt` topotest needed to be adjusted after this to add
`src-prefix='::/0'`.

Fixes: 88fa5104a04a ("staticd : Configuration northbound implementation")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 months agobgpd: fix table-map option 17802/head
Alexander Skorichenko [Thu, 23 Jan 2025 10:35:44 +0000 (11:35 +0100)]
bgpd: fix table-map option

Schedule zebra to withdraw routes filtered out by a table-map.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
3 months agozebra: install dst-src routes without NHG
David Lamparter [Mon, 27 Jan 2025 16:57:15 +0000 (17:57 +0100)]
zebra: install dst-src routes without NHG

The Linux kernel doesn't support dst-src routes with NHGs as nexthop,
for some (rather dubious) caching reasons.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 months agoMerge pull request #17905 from pguibert6WIND/advertised_routes_incorrect_json
Donatas Abraitis [Mon, 27 Jan 2025 21:32:33 +0000 (23:32 +0200)]
Merge pull request #17905 from pguibert6WIND/advertised_routes_incorrect_json

Advertised routes incorrect json

3 months agoMerge pull request #17919 from pguibert6WIND/bgp_suppressed_attribute
Donatas Abraitis [Mon, 27 Jan 2025 21:31:46 +0000 (23:31 +0200)]
Merge pull request #17919 from pguibert6WIND/bgp_suppressed_attribute

Bgp suppressed attribute

3 months agozebra: include resolving nexthops in nhg hash
Mark Stapp [Mon, 27 Jan 2025 19:17:24 +0000 (14:17 -0500)]
zebra: include resolving nexthops in nhg hash

Ensure that the nhg hash comparison function includes all
nexthops, including recursive-resolving nexthops.

Signed-off-by: Mark Stapp <mjs@cisco.com>
3 months agoMerge pull request #17926 from opensourcerouting/fix/remove_addpath_dynamic_handling
Donald Sharp [Mon, 27 Jan 2025 12:14:00 +0000 (07:14 -0500)]
Merge pull request #17926 from opensourcerouting/fix/remove_addpath_dynamic_handling

Revert "bgpd: Handle Addpath capability using dynamic capabilities"

3 months agobgpd: fix missing braces when dumping json vpn advertised-routes 17905/head
Philippe Guibert [Wed, 22 Jan 2025 14:35:06 +0000 (15:35 +0100)]
bgpd: fix missing braces when dumping json vpn advertised-routes

The json output of advertised-routes is incorrect, as there is a missing
brace with route-distinguisher:

observed with the bgp_vpnv4_noretain test:
> "bgpTableVersion":0,"bgpLocalRouterId":"192.0.2.1","defaultLocPrf":100,"localAS":65500,
> "advertisedRoutes": "192.0.2.1:1":{"rd":"192.0.2.1:1","10.101.0.0/24":{"prefix":"10.101.0.0/24",

expected:
> "bgpTableVersion":0,"bgpLocalRouterId":"192.0.2.1","defaultLocPrf":100,"localAS":65500,
> "advertisedRoutes": { "192.0.2.1:1":{"rd":"192.0.2.1:1","10.101.0.0/24":{"prefix":"10.101.0.0/24",
>                     ^
>                     missing brace

Fix this by adding the missing braces.

Fixes: 4838bac033a7 ("bgpd: neighbors received-routes/advertised-routes stringify changes")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bgp_vpnv4_noretain, check presence of locpref in adj-rib-out
Philippe Guibert [Mon, 6 Jan 2025 16:03:26 +0000 (17:03 +0100)]
topotests: bgp_vpnv4_noretain, check presence of locpref in adj-rib-out

Add a test that check that the detailed command of show bgp advertised
neighbors 10.125.0.2 displays the locpref value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bgp_aggregate_address_topo1, add test for suppressed keyword 17919/head
Philippe Guibert [Fri, 24 Jan 2025 12:38:21 +0000 (13:38 +0100)]
topotests: bgp_aggregate_address_topo1, add test for suppressed keyword

Add a test that checks that the BGP route to 192.168.0.1 has all the
necessary json outputs. This route is chosen because it is a suppressed
route.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix add json attribute to reflect suppressed path
Philippe Guibert [Fri, 24 Jan 2025 12:22:03 +0000 (13:22 +0100)]
bgpd: fix add json attribute to reflect suppressed path

When aggregate is used, the suppressed information is not displayed in
the json attributes of a given path. To illustrate, the dump of the
192.168.2.1/32 path in the bgp_aggregate_address_topo1 topotest:

> # show bgp ipv4
> [..]
>  s> 192.168.2.1/32   10.0.0.2                               0 65001 i
>
> # show bgp ipv4 detail
> [..]
> BGP routing table entry for 192.168.2.1/32, version 17
> Paths: (1 available, best #1, table default, vrf (null), Advertisements suppressed by an aggregate.)
>   Not advertised to any peer
>   65001            <---- missing suppressed flag
>     10.0.0.2 from 10.0.0.2 (10.254.254.3)
>       Origin IGP, valid, external, best (First path received)
>       Last update: Fri Jan 24 13:11:41 2025
>
> # show bgp ipv4 detail json
> [..]
> ,"192.168.2.1/32": [{"aspath":{"string":"65001","segments":[{"type":"as-sequence","list":[65001]}],"length":1},"origin":"IGP","valid":true,"version":17,
> "bestpath":{"overall":true,"selectionReason":"First path received"},                <---- missing suppressed flag
> "lastUpdate":{"epoch":1737720700,"string":"Fri Jan 24 13:11:40 2025\n"},
> "nexthops":[{"ip":"10.0.0.2","afi":"ipv4","metric":0,"accessible":true,"used":true}],
> "peer":{"peerId":"10.0.0.2","routerId":"10.254.254.3","type":"external"}}]

Fix this by adding the json information.

> # show bgp ipv4 detail
> [..]
> BGP routing table entry for 192.168.2.1/32, version 17
> Paths: (1 available, best #1, table default, vrf (null), Advertisements suppressed by an aggregate.)
>   Not advertised to any peer
>   65001, (suppressed)
>     10.0.0.2 from 10.0.0.2 (10.254.254.3)
>       Origin IGP, valid, external, best (First path received)
>       Last update: Fri Jan 24 13:11:41 2025
>
> # show bgp ipv4 detail json
> [..]
> ,"192.168.2.1/32": [{"aspath":{"string":"65001","segments":[{"type":"as-sequence","list":[65001]}],"length":1},"suppressed":true,"origin":"IGP","valid":true,"version":17,
> "bestpath":{"overall":true,"selectionReason":"First path received"},
> "lastUpdate":{"epoch":1737720991,"string":"Fri Jan 24 13:16:31 2025"},
> "nexthops":[{"ip":"10.0.0.2","afi":"ipv4","metric":0,"accessible":true,"used":true}],"peer":{"peerId":"10.0.0.2","routerId":"10.254.254.3","type":"external"}}]

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #17917 from pguibert6WIND/isis_duplicate_asla
Donatas Abraitis [Mon, 27 Jan 2025 09:51:14 +0000 (11:51 +0200)]
Merge pull request #17917 from pguibert6WIND/isis_duplicate_asla

isisd: fix duplicate rfc8919 defines

3 months agoRevert "bgpd: Handle Addpath capability using dynamic capabilities" 17926/head
Donatas Abraitis [Sat, 25 Jan 2025 18:28:26 +0000 (20:28 +0200)]
Revert "bgpd: Handle Addpath capability using dynamic capabilities"

This reverts commit 05cf9d03b345393b8d63ffe9345c42debd8362b6.

TL;DR; Handling BGP AddPath capability is not trivial (possible) dynamically.

When the sender is AddPath-capable and sends NLRIs encoded with AddPath ID,
and at the same time the receiver sends AddPath capability "disable-addpath-rx"
(flag update) via dynamic capabilities, both peers are out of sync about the
AddPath state. The receiver thinks already he's not AddPath-capable anymore,
hence it tries to parse NLRIs as non-AddPath, while they are actually encoded
as AddPath.

AddPath capability itself does not provide (in RFC) any mechanism on backward
compatible way to handle NLRIs if they come mixed (AddPath + non-AddPath).

This explains why we have failures in our CI periodically.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agobgpd: Optimize evaluate paths for a peer going down 17924/head
Donald Sharp [Fri, 24 Jan 2025 20:04:13 +0000 (15:04 -0500)]
bgpd: Optimize evaluate paths for a peer going down

Currently when a directly connected peer is going down
BGP gets a call back for nexthop tracking in addition
the interface down events.  On the interface down
event BGP goes through and sets up a per peer Q that
holds all the bgp path info's associated with that peer
and then it goes and processes this in the future.  In
the meantime zebra is also at work and sends a nexthop
removal event to BGP as well.  This triggers a complete
walk of all path info's associated with the bnc( which
happens to be all the path info's already scheduled
for removal here shortly).  This evaluate paths
is not an inexpensive operation in addition the work
for handling this is already being done via the
peer down queue.  Let's optimize the bnc handling
of evaluate paths and check to see if the peer is
still up to actually do the work here.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 months agoMerge pull request #17912 from opensourcerouting/libyang_require
Jafar Al-Gharaibeh [Fri, 24 Jan 2025 19:05:18 +0000 (13:05 -0600)]
Merge pull request #17912 from opensourcerouting/libyang_require

redhat: Specify minimum libyang version requirement

3 months agoisisd: fix duplicate rfc8919 defines 17917/head
Philippe Guibert [Fri, 24 Jan 2025 09:32:37 +0000 (10:32 +0100)]
isisd: fix duplicate rfc8919 defines

The application specific defines from rfc8919 were defined twice in the
isis tlv headers. Remove the second one.

Fixes: 5749ac83a8ad ("isisd: add ASLA support")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #17911 from askorichenko/test-fix-bgp-peer-solo
Donatas Abraitis [Fri, 24 Jan 2025 06:50:49 +0000 (08:50 +0200)]
Merge pull request #17911 from askorichenko/test-fix-bgp-peer-solo

bgpd: Fix bgp peer solo option

3 months agobgpd,lib: document the table id / instance usage 17736/head
Rafael Zalamena [Thu, 23 Jan 2025 18:13:01 +0000 (15:13 -0300)]
bgpd,lib: document the table id / instance usage

Document where relevant about the instance overload to table ID so users
know what to expect.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 months agotopotests: test direct-table on different VRFs
Rafael Zalamena [Mon, 30 Dec 2024 19:55:49 +0000 (16:55 -0300)]
topotests: test direct-table on different VRFs

Test new zebra feature that allows table-direct to work on any VRF
with BGP.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 months agobgpd: allow table-direct on different VRFs
Rafael Zalamena [Mon, 30 Dec 2024 19:55:12 +0000 (16:55 -0300)]
bgpd: allow table-direct on different VRFs

Allow table-direct to be configured in different VRFs.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 months agolib,zebra: VRF table-direct support
Rafael Zalamena [Thu, 11 Jan 2024 20:23:28 +0000 (17:23 -0300)]
lib,zebra: VRF table-direct support

Implement the necessary data structures and code changes to support sending
table-direct routes to protocols running in different VRFs.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 months agolib: abstract instance redistribution management
Rafael Zalamena [Thu, 11 Jan 2024 20:12:44 +0000 (17:12 -0300)]
lib: abstract instance redistribution management

Use the linked list `del` callback to free memory instead of manually calling.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 months agoospfd: Prune duplicate next-hops when installing into zebra 17906/head
Acee Lindem [Wed, 22 Jan 2025 20:41:47 +0000 (20:41 +0000)]
ospfd: Prune duplicate next-hops when installing into zebra

Duplicate next-hops are maintained for OSPF inter-area and AS
external routes in the OSPF routing table as long as they
correspond to LSAs for different adverting routers. The
intra-area route computation will not result in duplicate
next-hops.

Signed-off-by: Acee Lindem <acee@lindem.com>
3 months agotests: OSPF topotest for next-hop pruning
Acee Lindem [Wed, 22 Jan 2025 20:32:50 +0000 (20:32 +0000)]
tests: OSPF topotest for next-hop pruning

OSPF topotest to test OSPF next-hop pruning on installation
into zebra routing table. Also fix multicast_pim_dr_nondr_test
topotest which had a duplicate OSPF route in the results.

Signed-off-by: Acee Lindem <acee@lindem.com>
X

3 months agoredhat: Specify minimum libyang version requirement 17912/head
Martin Winter [Thu, 23 Jan 2025 13:13:51 +0000 (14:13 +0100)]
redhat: Specify minimum libyang version requirement

Version requirement from a BuildRequire get dropped and don't get
reflected in Require's for the package. Specify it both ways for
Libyang as we require >= 2.1.128

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 months agobgpd: Fix bgp peer solo option 17911/head
Alexander Skorichenko [Thu, 23 Jan 2025 11:14:41 +0000 (12:14 +0100)]
bgpd: Fix bgp peer solo option

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
3 months agoMerge pull request #17898 from Pdoijode/pdoijode/fix-ip-route-cmd
Donatas Abraitis [Thu, 23 Jan 2025 13:46:59 +0000 (15:46 +0200)]
Merge pull request #17898 from Pdoijode/pdoijode/fix-ip-route-cmd

zebra: Return error if v6 prefix is passed to show ip route

3 months agoMerge pull request #17652 from pguibert6WIND/topotest_bgp_evpn_rt5
Donatas Abraitis [Thu, 23 Jan 2025 11:12:35 +0000 (13:12 +0200)]
Merge pull request #17652 from pguibert6WIND/topotest_bgp_evpn_rt5

bgpd, tests: bgp_evpn_rt5, add test with match evpn vni command

3 months agoMerge pull request #17904 from louis-6wind/fix-bfd-pg-update-group
Donatas Abraitis [Thu, 23 Jan 2025 08:09:55 +0000 (10:09 +0200)]
Merge pull request #17904 from louis-6wind/fix-bfd-pg-update-group

bgpd: fix bfd with update-source in peer-group

3 months agozebra: Return error if v6 prefix is passed to show ip route 17898/head
Pooja Jagadeesh Doijode [Tue, 21 Jan 2025 22:19:32 +0000 (14:19 -0800)]
zebra: Return error if v6 prefix is passed to show ip route

Return error if IPv6 address or prefix is passed as an argument
to "show ip route" command.

UT:
r1# show ip route 2::3/128
% Cannot specify IPv6 address/prefix for IPv4 table
r1#
r1# show ip route 2::3
% Cannot specify IPv6 address/prefix for IPv4 table
r1#

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
3 months agotopotests: isis_srv6_topo1, fix wrong srte path 17848/head
Philippe Guibert [Wed, 22 Jan 2025 16:18:03 +0000 (17:18 +0100)]
topotests: isis_srv6_topo1, fix wrong srte path

There is no connectivity by using the proposed srv6 path.

> From Carmine:
> This seg6-route tells rt1 to steer packets destined to fc00:0:9::1 over this path: rt1->rt2->-rt6.
> This path is not correct. Since we are installing this seg6-route on rt1,
> it means that a packet matching this seg6-route has already reached rt1.
> So rt1 should not be part of the path.
> The correct path should be rt2->rt6.

Fix this by changing the proposed seg6 route. Also, the ping test should
be swapped, because invalidating the RT1 locator does not have any
impacts on the built SRv6 path.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix bfd with update-source in peer-group 17904/head
Louis Scalbert [Wed, 22 Jan 2025 12:30:55 +0000 (13:30 +0100)]
bgpd: fix bfd with update-source in peer-group

Fix BFD session not created when the peer is in update-group with the
update-source option.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agotests: check bfd with update-source in peer-group
Louis Scalbert [Wed, 22 Jan 2025 12:30:04 +0000 (13:30 +0100)]
tests: check bfd with update-source in peer-group

Check bfd with update-source in peer-group.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agoisis_srv6_topo1: fix ping does not work as expected
Philippe Guibert [Mon, 13 Jan 2025 14:41:32 +0000 (15:41 +0100)]
isis_srv6_topo1: fix ping does not work as expected

The ping test does not detect when the command fails.

> 2025-01-13 15:38:27,494 INFO: topo: [+] check rt1 fc00:0:9::1 0% packet loss
> 2025-01-13 15:38:27,494 WARNING: topo: Waiting time is too small (count=10, wait=1), using default values (count=20, wait=3)
> 2025-01-13 15:38:28,501 WARNING: rt1: Router(rt1): proc failed: rc 1 pid 2028454
>  args: /usr/bin/nsenter --mount=/proc/2026950/ns/mnt --net=/proc/2026950/ns/net --uts=/proc/2026950/ns/uts -F --wd=/tmp/topotests/isis_srv6_topo1.test_isis_srv6_topo1/rt1 /bin/bash -c ping6 fc00:0:9::1 -c 1 -w 1
>  stdout: PING fc00:0:9::1(fc00:0:9::1) 56 data bytes
>
> --- fc00:0:9::1 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
>  stderr: *empty*
> 2025-01-13 15:38:28,501 INFO: topo: PING fc00:0:9::1(fc00:0:9::1) 56 data bytes
>
> --- fc00:0:9::1 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
>
>
> PASSED
>

The match string is not precise enough. Complete it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #17899 from chiragshah6/evpn_dev1
Donatas Abraitis [Wed, 22 Jan 2025 08:23:44 +0000 (10:23 +0200)]
Merge pull request #17899 from chiragshah6/evpn_dev1

bgpd: fix evpn path info get api

3 months agoMerge pull request #17889 from louis-6wind/fix-rpki-table-version
Donatas Abraitis [Wed, 22 Jan 2025 05:06:25 +0000 (07:06 +0200)]
Merge pull request #17889 from louis-6wind/fix-rpki-table-version

tests: remove table version check in bgp rpki topo1

3 months agoMerge pull request #17894 from pguibert6WIND/bmp_send_peerx_twice
Donatas Abraitis [Wed, 22 Jan 2025 05:03:58 +0000 (07:03 +0200)]
Merge pull request #17894 from pguibert6WIND/bmp_send_peerx_twice

bgpd: fix do not send twice peer up/down messages

3 months agobgpd: fix evpn path info get api 17899/head
Chirag Shah [Tue, 7 Jan 2025 02:57:54 +0000 (18:57 -0800)]
bgpd: fix evpn path info get api

EVPN imported routes AF is not AF_EVPN, in that case
the path info extra with EVPN is nver created.
In order to create evpn info under path extra, define
new api which does not specifically check for AF_EVPN
afi type.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 months agoMerge pull request #17895 from LabNConsulting/chopps/fix-coverity-use-after-free
Donald Sharp [Tue, 21 Jan 2025 19:09:41 +0000 (14:09 -0500)]
Merge pull request #17895 from LabNConsulting/chopps/fix-coverity-use-after-free

lib: fix coverity use after free issue: CID 1620101

3 months agoMerge pull request #17793 from LabNConsulting/working/lb/fix-r8-rpms
Jafar Al-Gharaibeh [Tue, 21 Jan 2025 16:32:32 +0000 (10:32 -0600)]
Merge pull request #17793 from LabNConsulting/working/lb/fix-r8-rpms

Fix Rocky 8 RPMs, add options to build without rpki and docs (default is to include)

3 months agolib: fix coverity use after free issue: CID 1620101 17895/head
Christian Hopps [Mon, 20 Jan 2025 18:33:15 +0000 (18:33 +0000)]
lib: fix coverity use after free issue: CID 1620101

The code doesn't push more than one group (currently) so wouldn't hit the
bug yet, nice catch by coverity.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agobgpd: fix do not send twice peer up/down messages 17894/head
Philippe Guibert [Tue, 21 Jan 2025 14:34:13 +0000 (15:34 +0100)]
bgpd: fix do not send twice peer up/down messages

With recent BMP code, on a standard BMP config, the peer up and peer
down messages related to a BGP peer are sent twice, whereas they should
be send only once.

Fix this by better controlling the condition.

Fixes: f8a693311145 ("bgpd: bmp, handle imported bgp instances for peer up/down events")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #17888 from krishna-samy/bgpd_mac_hash
Donatas Abraitis [Tue, 21 Jan 2025 14:29:32 +0000 (16:29 +0200)]
Merge pull request #17888 from krishna-samy/bgpd_mac_hash

bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table

3 months agoMerge pull request #16723 from jklaiber/fix-reload-interface-deletion
Donatas Abraitis [Tue, 21 Jan 2025 14:28:28 +0000 (16:28 +0200)]
Merge pull request #16723 from jklaiber/fix-reload-interface-deletion

tools: fix reload interface deletion

3 months agobgpd: fix static analyzer issues around bgp pointer 17652/head
Philippe Guibert [Thu, 9 Jan 2025 20:31:01 +0000 (21:31 +0100)]
bgpd: fix static analyzer issues around bgp pointer

Some static analyzer issues can be observed in BGP code:

> In file included from ./lib/zebra.h:13,
>                  from lib/event.c:8:
> ./lib/compiler.h:222:26: note: '#pragma message: Remove `clear thread cpu` command'
>   222 | #define CPP_NOTICE(text) _Pragma(CPP_STR(message text))
>       |                          ^~~~~~~
> lib/event.c:433:1: note: in expansion of macro 'CPP_NOTICE'
>   433 | CPP_NOTICE("Remove `clear thread cpu` command")
>       | ^~~~~~~~~~
> bgpd/bgp_vty.c:1592:5: warning: Access to field 'as_pretty' results in a dereference of a null pointer (loaded from variable 'bgp') [core.NullDereference]
> 1592 |                                 bgp->as_pretty);
>       |                                 ^~~~~~~~~~~~~~
> bgpd/bgp_vty.c:1599:5: warning: Access to field 'as_pretty' results in a dereference of a null pointer (loaded from variable 'bgp') [core.NullDereference]
> 1599 |                                 bgp->as_pretty);
>       |                                 ^~~~~~~~~~~~~~
> bgpd/bgp_vty.c:1612:7: warning: Access to field 'flags' results in a dereference of a null pointer (loaded from variable 'bgp') [core.NullDereference]
> 1612 |                     IS_BGP_INSTANCE_HIDDEN(bgp)) {
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./bgpd/bgpd.h:2906:3: note: expanded from macro 'IS_BGP_INSTANCE_HIDDEN'
> 2906 |         (CHECK_FLAG(_bgp->flags, BGP_FLAG_INSTANCE_HIDDEN) &&                  \
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./lib/zebra.h:274:31: note: expanded from macro 'CHECK_FLAG'
>   274 | #define CHECK_FLAG(V,F)      ((V) & (F))
>       |                               ^~~
> bgpd/bgp_vty.c:1614:4: warning: Access to field 'flags' results in a dereference of a null pointer (loaded from variable 'bgp') [core.NullDereference]
> 1614 |                         UNSET_FLAG(bgp->flags, BGP_FLAG_INSTANCE_HIDDEN);
>       |                         ^          ~~~
> ./lib/zebra.h:276:34: note: expanded from macro 'UNSET_FLAG'
>   276 | #define UNSET_FLAG(V,F)      (V) &= ~(F)
>       |                               ~  ^
> 4 warnings generated.
> Static Analysis warning summary compared to base:

Fix those issues by protecting the bgp pointer.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix import vrf creates multiple bgp instances
Philippe Guibert [Thu, 9 Jan 2025 09:26:02 +0000 (10:26 +0100)]
bgpd: fix import vrf creates multiple bgp instances

The more the vrf green is referenced in the import bgp command, the more
there are instances created. The below configuration shows that the vrf
green is referenced twice, and two BGP instances of vrf green are
created.

The below configuration:
> router bgp 99
> [..]
>  import vrf green
> exit
> router bgp 99 vrf blue
> [..]
>  import vrf green
> exit
> router bgp 99 vrf green
> [..]
> exit
>
> r4# show bgp vrfs
> Type  Id     routerId          #PeersCfg  #PeersEstb  Name
>              L3-VNI            RouterMAC              Interface
> DFLT  0      10.0.3.4          0          0           default
>              0                 00:00:00:00:00:00      unknown
>  VRF  5      10.0.40.4         0          0           blue
>              0                 00:00:00:00:00:00      unknown
>  VRF  6      0.0.0.0           0          0           green
>              0                 00:00:00:00:00:00      unknown
>  VRF  6      10.0.94.4         0          0           green
>              0                 00:00:00:00:00:00      unknown

Fix this at import command, by looking at an already present bgp
instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix duplicate BGP instance created with unified config
Philippe Guibert [Tue, 31 Dec 2024 13:38:11 +0000 (14:38 +0100)]
bgpd: fix duplicate BGP instance created with unified config

When running the bgp_evpn_rt5 setup with unified config, memory leak
about a non deleted BGP instance happens.

> root@ubuntu2204hwe:~/frr/tests/topotests/bgp_evpn_rt5# cat /tmp/topotests/bgp_evpn_rt5.test_bgp_evpn/r1.asan.bgpd.1164105
>
> =================================================================
> ==1164105==ERROR: LeakSanitizer: detected memory leaks
>
> Indirect leak of 12496 byte(s) in 1 object(s) allocated from:
>     #0 0x7f358eeb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7f358e877233 in qcalloc lib/memory.c:106
>     #2 0x55d06c95680a in bgp_create bgpd/bgpd.c:3405
>     #3 0x55d06c95a7b3 in bgp_get bgpd/bgpd.c:3805
>     #4 0x55d06c87a9b5 in bgp_get_vty bgpd/bgp_vty.c:603
>     #5 0x55d06c68dc71 in bgp_evpn_local_l3vni_add bgpd/bgp_evpn.c:7032
>     #6 0x55d06c92989b in bgp_zebra_process_local_l3vni bgpd/bgp_zebra.c:3204
>     #7 0x7f358e9e3feb in zclient_read lib/zclient.c:4626
>     #8 0x7f358e98082d in event_call lib/event.c:1996
>     #9 0x7f358e848931 in frr_run lib/libfrr.c:1232
>     #10 0x55d06c60eae1 in main bgpd/bgp_main.c:557
>     #11 0x7f358e229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Actually, a BGP VRF Instance is created in auto mode when creating the
global BGP instance for the L3 VNI. And again, an other BGP VRF instance
is created. Fix this by ensuring that a non existing BGP instance is not
present. If it is present, and with auto mode or in hidden mode, then
override the AS value.

Fixes: f153b9a9b636 ("bgpd: Ignore auto created VRF BGP instances")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix bgp evpn memory leaks when adj-rib-in is disabled
Philippe Guibert [Tue, 31 Dec 2024 13:42:17 +0000 (14:42 +0100)]
bgpd: fix bgp evpn memory leaks when adj-rib-in is disabled

Some bgp evpn memory contexts are not freed at the end of the bgp
process.

> =================================================================
> ==1208677==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 96 byte(s) in 2 object(s) allocated from:
>     #0 0x7f93ad4b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7f93ace77233 in qcalloc lib/memory.c:106
>     #2 0x563bb68f4df1 in process_type5_route bgpd/bgp_evpn.c:5084
>     #3 0x563bb68fb663 in bgp_nlri_parse_evpn bgpd/bgp_evpn.c:6302
>     #4 0x563bb69ea2a9 in bgp_nlri_parse bgpd/bgp_packet.c:347
>     #5 0x563bb69f7716 in bgp_update_receive bgpd/bgp_packet.c:2482
>     #6 0x563bb6a04d3b in bgp_process_packet bgpd/bgp_packet.c:4091
>     #7 0x7f93acf8082d in event_call lib/event.c:1996
>     #8 0x7f93ace48931 in frr_run lib/libfrr.c:1232
>     #9 0x563bb6880ae1 in main bgpd/bgp_main.c:557
>     #10 0x7f93ac829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Actually, the bgp evpn context may noy be used if adj rib in is unused.
This may lead to memory leaks. Fix this by freeing the context in those
corner cases.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: add unified configuration
Philippe Guibert [Thu, 19 Dec 2024 16:28:21 +0000 (17:28 +0100)]
topotests: add unified configuration

Replace the various per-daemon config files with a unique frr.conf
configuration file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bgp_evpn_rt5, configure route_distinguisher
Philippe Guibert [Mon, 30 Dec 2024 15:04:14 +0000 (16:04 +0100)]
topotests: bgp_evpn_rt5, configure route_distinguisher

When not configuring a route distinguisher, neither route-target,
the derived rd settings differ if config load applies with frr.conf
or not. For instance, the forged rd with frr.conf:

> # show bgp l2vpn evpn json
>    "192.168.101.41:3":{
>       "rd":"192.168.101.41:3",

and without:
>     "192.168.101.41:2":{
>        "rd":"192.168.101.41:2",

The defined rts also are impacted. Temporay fix this by using an
hardset configuration for all route distinguisher and route target
of the setups.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bgp_evpn_rt5, add test with match evpn vni command
Philippe Guibert [Mon, 16 Dec 2024 14:29:39 +0000 (15:29 +0100)]
topotests: bgp_evpn_rt5, add test with match evpn vni command

Add a test that ensures that the 'match evpn vni' command works with bgp
evpn rt5 updates.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotests: remove table version check in bgp rpki topo1 17889/head
Louis Scalbert [Tue, 21 Jan 2025 10:17:04 +0000 (11:17 +0100)]
tests: remove table version check in bgp rpki topo1

Remove table version check in bgp rpki topo1.

Fixes: 5f50b98f8e ("tests: add bgp rpki topo1 rpkiValidationState")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agobgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table 17888/head
Krishnasamy R [Tue, 21 Jan 2025 09:06:53 +0000 (01:06 -0800)]
bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table

Issue:
During FRR restart, we fail to add some of the local interface's MAC
to the 'bgp mac hash'. Not having local MAC in the hash table can cause
lookup issues while receiving EVPN RT-2.

Currently, we have code to add local MAC(bgp_mac_add_mac_entry) while handling
interface add/up events in BGP(bgp_ifp_up/bgp_ifp_create). But the code
'bgp_mac_add_mac_entry' in bgp_ifp_create is not getting invoked as it
is placed under a specific check(vrf->bgp link check).

Fix:
We can skip this check 'vrf->bgp link existence' as the tenant VRF might
not have BGP instance but still we want to cache the tenant VRF local
MACs. So keeping this check in bgp_ifp_create inline with bgp_ifp_up.

Ticket: #4204154

Signed-off-by: Krishnasamy R <krishnasamyr@nvidia.com>
3 months agoMerge pull request #17883 from opensourcerouting/fix/topotest_dynamic_cap_enhe
Jafar Al-Gharaibeh [Mon, 20 Jan 2025 19:31:47 +0000 (13:31 -0600)]
Merge pull request #17883 from opensourcerouting/fix/topotest_dynamic_cap_enhe

tests: Fix test_bgp_dynamic_capability_enhe topotest

3 months agoMerge pull request #17882 from LabNConsulting/chopps/doc-update-mgmtd
Jafar Al-Gharaibeh [Mon, 20 Jan 2025 19:29:37 +0000 (13:29 -0600)]
Merge pull request #17882 from LabNConsulting/chopps/doc-update-mgmtd

small mgmtd-dev doc update and yanglint cleanup

3 months agoMerge pull request #17874 from pguibert6WIND/bgp_unnumbered_interface_json
Donatas Abraitis [Mon, 20 Jan 2025 15:35:26 +0000 (17:35 +0200)]
Merge pull request #17874 from pguibert6WIND/bgp_unnumbered_interface_json

Bgp unnumbered interface json

3 months agoMerge pull request #17885 from LabNConsulting/chopps/fix-gen-cb-regression
Donatas Abraitis [Mon, 20 Jan 2025 12:26:13 +0000 (14:26 +0200)]
Merge pull request #17885 from LabNConsulting/chopps/fix-gen-cb-regression

tools: fix regression in gen_northbound_callback tool

3 months agotopotests: bgp_ipv6_rtadv, add control over bgp updates 17874/head
Philippe Guibert [Fri, 17 Jan 2025 16:26:50 +0000 (17:26 +0100)]
topotests: bgp_ipv6_rtadv, add control over bgp updates

Add a test to control the json values of the incoming BGP update
received by an unnumbered BGP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix display json value of interface for BGP unnumbered
Philippe Guibert [Fri, 17 Jan 2025 16:28:00 +0000 (17:28 +0100)]
bgpd: fix display json value of interface for BGP unnumbered

The 'show bgp ipv[4,6] json' command does not display the interface
value of the nexthop, when BGP sessions are unnumbered, whereas the
non json output displays it correctly. The below example indicates
'r1-eth0' wheras in json, the value is not displayed.

> r1# show bgp ipv4
> BGP table version is 3, local router ID is 10.254.254.1, vrf id 0
> Default local pref 100, local AS 101
> Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
>                i internal, r RIB-failure, S Stale, R Removed
> Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
> Origin codes:  i - IGP, e - EGP, ? - incomplete
> RPKI validation codes: V valid, I invalid, N Not found
>
>      Network          Next Hop            Metric LocPrf Weight Path
>  *>  10.254.254.1/32  0.0.0.0                  0         32768 ?
>  *>  10.254.254.2/32  r1-eth0                  0             0 102 ?
>
> Displayed 2 routes and 2 total paths

Fix this by adding an 'interface' keyword in the json attributes.

> "nexthops":[{"ip":"2001:db8:1::2","hostname":"r2","afi":"ipv6",
> "scope":"global"},{"interface":"r1-eth0","ip":"fe80::1868:d7ff:fe66:45ae",
> "hostname":"r2","afi":"ipv6","scope":"link-local","used":true}]}]

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agoMerge pull request #16894 from wenwang00/project-phoenixwing-ysj
Philippe Guibert [Mon, 20 Jan 2025 08:20:15 +0000 (09:20 +0100)]
Merge pull request #16894 from wenwang00/project-phoenixwing-ysj

staticd: Add support for SRv6 Static SIDs

3 months agoMerge pull request #17884 from LabNConsulting/chopps/fix-dnode-create
Donatas Abraitis [Mon, 20 Jan 2025 07:14:59 +0000 (09:14 +0200)]
Merge pull request #17884 from LabNConsulting/chopps/fix-dnode-create

lib: fix dnode_create to use correct libyang function.

3 months agotools: fix regression in gen_northbound_callback tool 17885/head
Christian Hopps [Mon, 20 Jan 2025 06:01:59 +0000 (06:01 +0000)]
tools: fix regression in gen_northbound_callback tool

When support for new style `get()` was added inadvertently stopped
generating other callbacks and prototypes. Fix this.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agobgpd: Set last reset `No AFI/SAFI activated for peer` after we do defaults 17881/head
Donatas Abraitis [Sat, 18 Jan 2025 12:54:20 +0000 (14:54 +0200)]
bgpd: Set last reset `No AFI/SAFI activated for peer` after we do defaults

Move checking if the peer is active only after we apply defaults for address
families.

If the family got activated after applying the defaults we should reset last_reset
reason.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agobgpd: Do not show "Waiting for OPEN" as last reset
Donatas Abraitis [Sat, 18 Jan 2025 12:16:06 +0000 (14:16 +0200)]
bgpd: Do not show "Waiting for OPEN" as last reset

This is actually not reset, and should be ignored showing it as last reset
under `show bgp neighbor`.

Fixes: 1e91f1d1193003cb325a2bf595c8a9273740e2f0 ("bgpd: Update failed reason to distinguish some NHT scenario")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agolib: fix dnode_create to use correct libyang function. 17884/head
Christian Hopps [Sat, 18 Jan 2025 23:39:32 +0000 (23:39 +0000)]
lib: fix dnode_create to use correct libyang function.

The previous use of `lyd_new_path()` returns the first node created, rather
than the xpath target node. The code is lucky in the sense that it is
normally only creating a single node rather than a branch. Fix this to
use `lyd_new_path2()` which returns the target node to actually implement
the semantics expected by callers of `dnode_create()` (i.e., returning the
newly created target node).

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: Fix test_bgp_dynamic_capability_enhe topotest 17883/head
Donatas Abraitis [Sat, 18 Jan 2025 21:06:13 +0000 (23:06 +0200)]
tests: Fix test_bgp_dynamic_capability_enhe topotest

Drop redundant function (duplicate), and reset counters for r2 instead of r1.

We check received capabilities on r2, hence we need to flush the counters on r2 too.

Fixes: d1cfd730601e5063d126ca1e78be5695fe909a77 ("tests: Check if ENHE capability can be handled dynamically")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agoMerge pull request #17876 from LabNConsulting/chopps/backend-ds-notify
Donald Sharp [Sat, 18 Jan 2025 19:42:18 +0000 (14:42 -0500)]
Merge pull request #17876 from LabNConsulting/chopps/backend-ds-notify

Handle datastore notifications correctly in backend clients (daemons)

3 months agodoc: add misplaced doc change for mgmtd development 17882/head
Christian Hopps [Sat, 18 Jan 2025 18:17:18 +0000 (18:17 +0000)]
doc: add misplaced doc change for mgmtd development

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agoyang: lint cleanup of test module
Christian Hopps [Sat, 18 Jan 2025 18:17:36 +0000 (18:17 +0000)]
yang: lint cleanup of test module

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: split notify test to regular and datastore notify tests 17876/head
Christian Hopps [Thu, 16 Jan 2025 06:15:26 +0000 (06:15 +0000)]
tests: split notify test to regular and datastore notify tests

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agomgmtd: testc: add listen for datastore notifications
Christian Hopps [Thu, 16 Jan 2025 06:14:54 +0000 (06:14 +0000)]
mgmtd: testc: add listen for datastore notifications

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: improve error handling for datastore notifications
Christian Hopps [Fri, 17 Jan 2025 21:21:33 +0000 (21:21 +0000)]
lib: improve error handling for datastore notifications

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: mgmtd: only send notify selectors to backends that provide.
Christian Hopps [Sat, 18 Jan 2025 06:57:35 +0000 (06:57 +0000)]
lib: mgmtd: only send notify selectors to backends that provide.

- Previously we sent selectors to all backends when a replace was
  done, improve this to only send them to backends that provide
  the selected state.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: mgmt_be_client handles datastore notification using CBs
Christian Hopps [Thu, 16 Jan 2025 04:13:08 +0000 (04:13 +0000)]
lib: mgmt_be_client handles datastore notification using CBs

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: yang: add yang_parse_data function
Christian Hopps [Thu, 16 Jan 2025 04:14:03 +0000 (04:14 +0000)]
lib: yang: add yang_parse_data function

This is similar to notify and RPC parsers, but this is for normal datastore
data. This is initially used in handling datastore notifications being sent to
another backend client[s].

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agoMerge pull request #17880 from LabNConsulting/chopps/ci-arm
Donatas Abraitis [Sat, 18 Jan 2025 12:58:55 +0000 (14:58 +0200)]
Merge pull request #17880 from LabNConsulting/chopps/ci-arm

tests: ci: add ARM to docker based CI test

3 months agodoc: Add support for SRv6 static sid CLI 16894/head
Yuqing Zhao [Mon, 13 Jan 2025 10:51:34 +0000 (11:51 +0100)]
doc: Add support for SRv6 static sid CLI

Add the srv6 static sids configuration and
show running-config sections in static.rst.

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agotests: Add topotest for SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:27:36 +0000 (11:27 +0100)]
tests: Add topotest for SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agovtysh: Add SRv6 static SIDs CLI to vtysh
Yuqing Zhao [Mon, 13 Jan 2025 10:14:04 +0000 (11:14 +0100)]
vtysh: Add SRv6 static SIDs CLI to vtysh

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Add CLIs to show SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:13:38 +0000 (11:13 +0100)]
staticd: Add CLIs to show SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agostaticd: Add CLI for SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:13:07 +0000 (11:13 +0100)]
staticd: Add CLI for SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
3 months agolib: Add CLI node for SRv6 static SIDs
Yuqing Zhao [Mon, 13 Jan 2025 10:10:48 +0000 (11:10 +0100)]
lib: Add CLI node for SRv6 static SIDs

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>