]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 days agotests: bgp_evpn_rt5 reformat configuration commands
Louis Scalbert [Wed, 23 Apr 2025 11:39:13 +0000 (13:39 +0200)]
tests: bgp_evpn_rt5 reformat configuration commands

Reformat configuration commands in human readable style.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 rename vrfs
Louis Scalbert [Wed, 23 Apr 2025 11:16:32 +0000 (13:16 +0200)]
tests: bgp_evpn_rt5 rename vrfs

No need to prefix with the router name.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 re-address rd and rt
Louis Scalbert [Wed, 23 Apr 2025 11:15:01 +0000 (13:15 +0200)]
tests: bgp_evpn_rt5 re-address rd and rt

Re-address Route-Distinguisher and route-targets for clarity.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 don't check for file presence
Louis Scalbert [Wed, 23 Apr 2025 10:51:30 +0000 (12:51 +0200)]
tests: bgp_evpn_rt5 don't check for file presence

They are always there.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 reformat setup_module
Louis Scalbert [Wed, 23 Apr 2025 10:36:50 +0000 (12:36 +0200)]
tests: bgp_evpn_rt5 reformat setup_module

Cosmetic change for clarity

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 remove useless switches
Louis Scalbert [Wed, 23 Apr 2025 10:24:35 +0000 (12:24 +0200)]
tests: bgp_evpn_rt5 remove useless switches

They are not used.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 re-address overlay
Louis Scalbert [Wed, 23 Apr 2025 09:24:51 +0000 (11:24 +0200)]
tests: bgp_evpn_rt5 re-address overlay

for clarity

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: bgp_evpn_rt5 re-address underlay
Louis Scalbert [Wed, 23 Apr 2025 09:49:13 +0000 (11:49 +0200)]
tests: bgp_evpn_rt5 re-address underlay

for clarity.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agotests: remove r3 from bgp_evpn_rt5
Louis Scalbert [Wed, 23 Apr 2025 09:46:33 +0000 (11:46 +0200)]
tests: remove r3 from bgp_evpn_rt5

It is not used at all.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 days agoMerge pull request #18672 from usrivastava-nvidia/master
Jafar Al-Gharaibeh [Thu, 24 Apr 2025 04:17:45 +0000 (23:17 -0500)]
Merge pull request #18672 from usrivastava-nvidia/master

pimd: Fix for crash during networking restart

6 days agopimd: Fix for crash during networking restart 18672/head
Utkarsh Srivastava [Thu, 10 Apr 2025 05:49:34 +0000 (22:49 -0700)]
pimd: Fix for crash during networking restart

During vrf delete, the vxlan_info.work_list
linked list was deleted which is a global list
containing the SGs for all the VRFs.

If two vrfs are configured, vrf a and vrf b and
both has SGs assocaited with them which are
inserted in the vxlan_info.work_list. Now if
vrf a is deleted, it deletes the work_list also.
Due to this when any SG add or del comes for vrf b
it tries to access the work_list and crashes.

Fix
Delete the vxlan_info.work_list only when all the
VRFs are terminated and unset the vxlan_info.flags
so if new add cmd comes it re-allocates the work_list.

Signed-off-by: usrivastava-nvidia <usrivastava@nvidia.com>
6 days agoMerge pull request #18691 from valentinbinotto/valentin-dev
Donald Sharp [Wed, 23 Apr 2025 13:23:12 +0000 (09:23 -0400)]
Merge pull request #18691 from valentinbinotto/valentin-dev

doc: state correct default behaviour of VTYSH_PAGER env if unset (vtysh manpage)

6 days agoMerge pull request #18677 from chdxD1/fix-rmac-nhlist
Philippe Guibert [Wed, 23 Apr 2025 13:07:01 +0000 (15:07 +0200)]
Merge pull request #18677 from chdxD1/fix-rmac-nhlist

zebra: add vtep_ip to rmac nh_list in all cases

6 days agoMerge pull request #16836 from cscarpitta/feature/srv6-show-sids
Donatas Abraitis [Wed, 23 Apr 2025 02:22:27 +0000 (05:22 +0300)]
Merge pull request #16836 from cscarpitta/feature/srv6-show-sids

zebra: Add CLI to display SRv6 SIDs allocated

6 days agoMerge pull request #18656 from leonshaw/evpn-strip-ecom
Donatas Abraitis [Wed, 23 Apr 2025 02:21:26 +0000 (05:21 +0300)]
Merge pull request #18656 from leonshaw/evpn-strip-ecom

bgpd: Clean extended communities for VRF routes imported from EVPN

6 days agoMerge pull request #18703 from donaldsharp/line_vty
Donatas Abraitis [Wed, 23 Apr 2025 02:08:39 +0000 (05:08 +0300)]
Merge pull request #18703 from donaldsharp/line_vty

doc: line vty was not documented

6 days agodoc: line vty was not documented 18703/head
Donald Sharp [Tue, 22 Apr 2025 19:18:41 +0000 (15:18 -0400)]
doc: line vty was not documented

Try to document the sub-node `line vty` and
what it can do.  Call out the distinction
between vtysh and VTY.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 days agoMerge pull request #18694 from petrvaganoff/dev
Donald Sharp [Tue, 22 Apr 2025 16:27:00 +0000 (12:27 -0400)]
Merge pull request #18694 from petrvaganoff/dev

bgpd: Fix deref after free in bgp_vrf_unlink

7 days agoMerge pull request #18698 from y-bharath14/srib-tests-v13
Donald Sharp [Tue, 22 Apr 2025 16:23:56 +0000 (12:23 -0400)]
Merge pull request #18698 from y-bharath14/srib-tests-v13

tests: Shadowing the built-in function

7 days agodoc: Updated the default for VTYSH_PAGER if unset in user docs 18691/head
Valentin Binotto [Tue, 22 Apr 2025 16:01:41 +0000 (16:01 +0000)]
doc: Updated the default for VTYSH_PAGER if unset in user docs

Signed-off-by: Valentin Binotto <git.8c400bab53f220f13efe0112c1ea2f96@v434project.com>
7 days agoMerge pull request #18683 from LabNConsulting/chopps/notif-improve
Russ White [Tue, 22 Apr 2025 15:27:16 +0000 (11:27 -0400)]
Merge pull request #18683 from LabNConsulting/chopps/notif-improve

Improve notification selectors (sort, eliminate dups)

7 days agotests: remove ipv4 and ipv6 in bgp_evpn_rt5 18677/head
Christopher Dziomba [Tue, 22 Apr 2025 15:25:57 +0000 (17:25 +0200)]
tests: remove ipv4 and ipv6 in bgp_evpn_rt5

Removal of IPv6 was already tested in bgp_evpn_rt5 topotest, however
IPv4 was not tested afterwards. This now removes IPv6 routes first,
then adds them back and removes IPv4 afterwards, waiting for
convergence everytime.

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
7 days agozebra: add vtep_ip to rmac nh_list in all cases
Christopher Dziomba [Thu, 17 Apr 2025 08:41:06 +0000 (10:41 +0200)]
zebra: add vtep_ip to rmac nh_list in all cases

zebra rmac has a nh_list which tracks the assigned VTEP IPs to RMACs.
It can also receive IPv6 encoded IPv4 addresses as VTEPs. Changing/
Installing the RMAC into the Kernel is only important when the IPv4
address changes. However because nh_list is a nodup list used to
track usage or RMACs by VTEP IPs, both IP addresses (IPv4 and IPv6
encoded IPv4) should be written into it, as both could be removed
in l3vni_rmac_nh_list_nh_delete independently.

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
7 days agoMerge pull request #18695 from askorichenko/test-show-advertised-routes-vty
Russ White [Tue, 22 Apr 2025 15:09:17 +0000 (11:09 -0400)]
Merge pull request #18695 from askorichenko/test-show-advertised-routes-vty

bgpd: fix vty's version of show advertised-routes

7 days agoMerge pull request #18158 from chdxD1/evpn-no-withdraw-for-update
Russ White [Tue, 22 Apr 2025 14:54:57 +0000 (10:54 -0400)]
Merge pull request #18158 from chdxD1/evpn-no-withdraw-for-update

Update EVPN prefix routes properly instead of withdraw/install

7 days agotests: Shadowing the built-in function 18698/head
Y Bharath [Tue, 22 Apr 2025 09:33:36 +0000 (15:03 +0530)]
tests: Shadowing the built-in function

Shadowing the built-in function in lutil.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
7 days agoMerge pull request #18626 from donaldsharp/RA_me
Russ White [Mon, 21 Apr 2025 21:32:58 +0000 (17:32 -0400)]
Merge pull request #18626 from donaldsharp/RA_me

Implement RFC8781 (NAT64 prefix in RA's)

7 days agobgpd: fix vty's version of show advertised-routes 18695/head
Alexander Skorichenko [Fri, 18 Apr 2025 11:08:45 +0000 (13:08 +0200)]
bgpd: fix vty's version of show advertised-routes

Fix displayed metric if a route-map is applied to advertised routes

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
8 days agoMerge pull request #18689 from donaldsharp/limit_outgoing_packets
Donatas Abraitis [Mon, 21 Apr 2025 16:29:12 +0000 (19:29 +0300)]
Merge pull request #18689 from donaldsharp/limit_outgoing_packets

bgpd: ensure that bgp_generate_updgrp_packets shares nicely

8 days agobgpd: Fix deref after free in bgp_vrf_unlink 18694/head
Petr Vaganov [Mon, 21 Apr 2025 15:52:24 +0000 (20:52 +0500)]
bgpd: Fix deref after free in bgp_vrf_unlink

Found by the static analyzer Svace (ISP RAS): DEREF_AFTER_FREE -
Pointer '&bgp->vrf_id' is dereferenced after the referenced memory
was deallocated by passing as 1st parameter to function 'bgp_unlock'.

Signed-off-by: Petr Vaganov <petrvaganoff@gmail.com>
8 days agolib: nb_notif: notification selectors sorted with no dups 18683/head
Christian Hopps [Tue, 1 Apr 2025 03:18:42 +0000 (03:18 +0000)]
lib: nb_notif: notification selectors sorted with no dups

Signed-off-by: Christian Hopps <chopps@labn.net>
8 days agomgmtd: validate notify selectors to be xpaths that result to nodes
Christian Hopps [Tue, 1 Apr 2025 03:05:02 +0000 (03:05 +0000)]
mgmtd: validate notify selectors to be xpaths that result to nodes

Also, only message interested backend clients about a path removal when last
supporting session is being removed from a given notification path.

Signed-off-by: Christian Hopps <chopps@labn.net>
8 days agolib: mgmt backend: add refer_id to notification message
Christian Hopps [Tue, 1 Apr 2025 03:03:18 +0000 (03:03 +0000)]
lib: mgmt backend: add refer_id to notification message

Signed-off-by: Christian Hopps <chopps@labn.net>
8 days agolib: darr: add string search macros
Christian Hopps [Fri, 18 Apr 2025 12:32:34 +0000 (12:32 +0000)]
lib: darr: add string search macros

Add macros to support searching for and finding (perhaps closest) matches
for a key in an array of strings.

Signed-off-by: Christian Hopps <chopps@labn.net>
10 days agozebra: Fix missing blank line checkpatch warning 16836/head
Carmine Scarpitta [Sun, 22 Sep 2024 14:40:30 +0000 (16:40 +0200)]
zebra: Fix missing blank line checkpatch warning

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agodoc: Add example for show specific SID CLI
Carmine Scarpitta [Sun, 15 Sep 2024 21:14:54 +0000 (23:14 +0200)]
doc: Add example for show specific SID CLI

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agodoc: Add example for show SIDs CLI
Carmine Scarpitta [Sun, 15 Sep 2024 21:14:41 +0000 (23:14 +0200)]
doc: Add example for show SIDs CLI

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agodoc: Add documentation for show SIDs command
Carmine Scarpitta [Sun, 15 Sep 2024 21:14:10 +0000 (23:14 +0200)]
doc: Add documentation for show SIDs command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agozebra: Add CLI to display SRv6 SIDs allocated
Carmine Scarpitta [Sun, 15 Sep 2024 20:33:39 +0000 (22:33 +0200)]
zebra: Add CLI to display SRv6 SIDs allocated

```
router# show segment-routing srv6 sid
 SID                   Behavior    Context                Daemon/Instance    Locator    Allocation Type
 --------------------  ----------  ---------------------  -----------------  ---------  -----------------
 fcbb:bbbb:1::         uN          -                      isis(0)            MAIN       dynamic
 fcbb:bbbb:1:fe00::    uDT6        VRF 'vrf10'            bgp(0)             MAIN       dynamic
 fcbb:bbbb:1:fe01::    uDT6        VRF 'vrf20'            bgp(0)             MAIN       dynamic
 fcbb:bbbb:1:e000::    uA          Interface 'eth-sw1'    isis(0)            MAIN       dynamic
 fcbb:bbbb:1:e001::    uA          Interface 'eth-sw1'    isis(0)            MAIN       dynamic
```

```
router# show segment-routing srv6 sid json
{
  "fc00:0:1::":{
    "sid":"fc00:0:1::",
    "behavior":"uN",
    "context":{},
    "locator":"loc1",
    "allocationMode":"dynamic",
    "clients":[
      {
        "proto":"isis",
        "instance":0
      }
    ]
  },
  "fc00:0:1:1::":{
    "sid":"fc00:0:1:1::",
    "behavior":"uA",
    "context":{
      "interfaceIndex":2,
      "interfaceName":"eth-sw1",
      "nexthopIpv6Address":"fe80::4423:f3ff:fe8b:fed"
    },
    "locator":"loc1",
    "allocationMode":"dynamic",
    "clients":[
      {
        "proto":"isis",
        "instance":0
      }
    ]
  },
  "fc00:0:1:2::":{
    "sid":"fc00:0:1:2::",
    "behavior":"uA",
    "context":{
      "interfaceIndex":2,
      "interfaceName":"eth-sw1",
      "nexthopIpv6Address":"fe80::9005:fdff:fe18:1237"
    },
    "locator":"loc1",
    "allocationMode":"dynamic",
    "clients":[
      {
        "proto":"isis",
        "instance":0
      }
    ]
  }
}
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agoisisd: Pass ifindex when releasing End.X SIDs
Carmine Scarpitta [Sat, 5 Oct 2024 14:59:00 +0000 (16:59 +0200)]
isisd: Pass ifindex when releasing End.X SIDs

When isisd releases an End.X SID it should also pass the interface
index down to zebra.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agoisisd: Pass ifindex when allocate End.X SIDs
Carmine Scarpitta [Mon, 24 Jun 2024 18:30:28 +0000 (20:30 +0200)]
isisd: Pass ifindex when allocate End.X SIDs

When isisd allocates an End.X SID it should also pass the interface
index down to zebra.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
10 days agolib: darr: use unique variable names in insert macro
Christian Hopps [Fri, 18 Apr 2025 12:19:36 +0000 (12:19 +0000)]
lib: darr: use unique variable names in insert macro

- Missed insert mcaro when fixing the other macros.
- Also, actually use `MT` argument in the mt variant insert macros

Signed-off-by: Christian Hopps <chopps@labn.net>
10 days agoMerge pull request #18692 from donaldsharp/event_cleanups
Donatas Abraitis [Sat, 19 Apr 2025 00:40:27 +0000 (03:40 +0300)]
Merge pull request #18692 from donaldsharp/event_cleanups

zebra: Save event pointer for rib sweeping

10 days agozebra: Save event pointer for rib sweeping 18692/head
Donald Sharp [Fri, 18 Apr 2025 21:44:39 +0000 (17:44 -0400)]
zebra: Save event pointer for rib sweeping

The rib_sweep_route function when not doing graceful
restart does not attempt to save the event on the
t_rib_sweep pointer for shutdown.  Prevent any
weird shenanigans by allowing shutdown to clean
up the rib_sweep_route event.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
10 days agobgpd: ensure that bgp_generate_updgrp_packets shares nicely 18689/head
Donald Sharp [Fri, 18 Apr 2025 17:50:33 +0000 (13:50 -0400)]
bgpd: ensure that bgp_generate_updgrp_packets shares nicely

The bgp_generate_updgrp_packet function will attempt to write
up to `write quanta 64` packets at one time.  This is extremely
expensive at scale and is causing CPU_HOGS as well as STARVATION
messages.  Check to see if we should yield the CPU to allow
something else in BGP to continue working.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 days agotopotests: Add check of imported routes for bgp_evpn_rt5 18656/head
Xiao Liang [Tue, 15 Apr 2025 08:34:20 +0000 (16:34 +0800)]
topotests: Add check of imported routes for bgp_evpn_rt5

In bgp_evpn_rt5, check if EVPN routes are correctly imported to VRF.
Note that EVPN and RT extended communities should have been stripped.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
11 days agobgpd: Clean extended communities for VRF routes imported from EVPN
Xiao Liang [Fri, 11 Apr 2025 10:04:50 +0000 (18:04 +0800)]
bgpd: Clean extended communities for VRF routes imported from EVPN

According to draft-ietf-bess-evpn-ipvpn-interworking-13, strip
the following extended communities for VRF routes imported from EVPN.

  a. BGP Encapsulation extended communities.
  b. Route Target extended communities.
  c. All the extended communities of type EVPN.

As the corresponding fields will not be always covered by extended
communities, add them to attr hash key directly.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
11 days agoMerge pull request #18675 from mjstapp/fix_clang_18_warnings
Donald Sharp [Thu, 17 Apr 2025 22:38:21 +0000 (18:38 -0400)]
Merge pull request #18675 from mjstapp/fix_clang_18_warnings

lib,pimd,bgpd,bfdd: Fix clang 18 warnings

12 days agoMerge pull request #18658 from y-bharath14/srib-tests-v12
Donatas Abraitis [Thu, 17 Apr 2025 15:18:26 +0000 (18:18 +0300)]
Merge pull request #18658 from y-bharath14/srib-tests-v12

tests: Resource leak in common_config.py

12 days agoMerge pull request #18538 from nabahr/autorp-enabling
Donald Sharp [Thu, 17 Apr 2025 14:14:13 +0000 (10:14 -0400)]
Merge pull request #18538 from nabahr/autorp-enabling

pimd: Only create and bind the autorp socket when really needed

13 days agobfdd, bgpd: clean up clang warnings 18675/head
Mark Stapp [Wed, 16 Apr 2025 15:39:26 +0000 (11:39 -0400)]
bfdd, bgpd: clean up clang warnings

Clean up some clang compiler warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
13 days agopimd: clean up clang warnings
Mark Stapp [Wed, 16 Apr 2025 15:38:35 +0000 (11:38 -0400)]
pimd: clean up clang warnings

Clean up clang warnings in pimd; mostly address-of-packed
issues (removed some ugly casts too).

Signed-off-by: Mark Stapp <mjs@cisco.com>
13 days agolib: disable clang warning in parser yacc output
Mark Stapp [Wed, 16 Apr 2025 15:37:33 +0000 (11:37 -0400)]
lib: disable clang warning in parser yacc output

Disable a clang 'unused' warning in the yacc source
of command_parse.c.

Signed-off-by: Mark Stapp <mjs@cisco.com>
13 days agoMerge pull request #18669 from opensourcerouting/rfapi-misused-conditional
Jafar Al-Gharaibeh [Wed, 16 Apr 2025 14:39:02 +0000 (09:39 -0500)]
Merge pull request #18669 from opensourcerouting/rfapi-misused-conditional

bgpd: fix misused rfapi conditional

13 days agoMerge pull request #18665 from y-bharath14/srib-yang-v10
Donald Sharp [Wed, 16 Apr 2025 13:41:32 +0000 (09:41 -0400)]
Merge pull request #18665 from y-bharath14/srib-yang-v10

yang: Corrected pyang errors in frr-pathd.yang

13 days agoMerge pull request #18497 from krishna-samy/show-metaq-counters
Mark Stapp [Wed, 16 Apr 2025 13:16:40 +0000 (09:16 -0400)]
Merge pull request #18497 from krishna-samy/show-metaq-counters

zebra: show command to display metaq info

13 days agoMerge pull request #18579 from krishna-samy/krishna/dplane_fpm_read
Mark Stapp [Wed, 16 Apr 2025 12:47:11 +0000 (08:47 -0400)]
Merge pull request #18579 from krishna-samy/krishna/dplane_fpm_read

zebra: change fpm_read to batch the messages

13 days agoMerge pull request #18667 from louis-6wind/fix-srv6-sid-leak
Carmine Scarpitta [Wed, 16 Apr 2025 11:50:09 +0000 (11:50 +0000)]
Merge pull request #18667 from louis-6wind/fix-srv6-sid-leak

isisd: fix srv6_sid memory leak

13 days agobgpd: fix misused rfapi conditional 18669/head
David Lamparter [Wed, 16 Apr 2025 10:44:38 +0000 (12:44 +0200)]
bgpd: fix misused rfapi conditional

bgpd/bgpd.c:8975:5: error: "ENABLE_BGP_VNC" is not defined, evaluates to 0 [-Werror=undef]
 8975 | #if ENABLE_BGP_VNC

Fixes: FRRouting#18546
Fixes: 1629c05924fe9 ("bgpd: rfapi: track outstanding rib and import timers, free mem at exit")
Cc: G. Paul Ziemba <paulz@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 days agoisisd: fix srv6_sid memory leak 18667/head
Louis Scalbert [Wed, 16 Apr 2025 09:23:54 +0000 (11:23 +0200)]
isisd: fix srv6_sid memory leak

Seen with isis_srv6_topo1 topotest.

> ==178793==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 56 byte(s) in 1 object(s) allocated from:
>     #0 0x7f3f63cb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7f3f6366f8dd in qcalloc lib/memory.c:105
>     #2 0x561b810c62b7 in isis_srv6_sid_alloc isisd/isis_srv6.c:243
>     #3 0x561b8111f944 in isis_zebra_srv6_sid_notify isisd/isis_zebra.c:1534
>     #4 0x7f3f637df9d7 in zclient_read lib/zclient.c:4845
>     #5 0x7f3f637779b2 in event_call lib/event.c:2011
>     #6 0x7f3f63642ff1 in frr_run lib/libfrr.c:1216
>     #7 0x561b81018bf2 in main isisd/isis_main.c:360
>     #8 0x7f3f63029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: 0af0f4616d ("isisd: Receive SRv6 SIDs notifications from zebra")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 days agoMerge pull request #18662 from mjstapp/fix_test_nb_endian
David Lamparter [Wed, 16 Apr 2025 08:49:13 +0000 (10:49 +0200)]
Merge pull request #18662 from mjstapp/fix_test_nb_endian

13 days agoyang: Corrected pyang errors in frr-pathd.yang 18665/head
Y Bharath [Wed, 16 Apr 2025 07:17:31 +0000 (12:47 +0530)]
yang: Corrected pyang errors in frr-pathd.yang

Corrected pyang warnings and errors in frr-pathd.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
13 days agozebra: change fpm_read to batch the messages 18579/head
Krishnasamy [Fri, 4 Apr 2025 11:36:39 +0000 (11:36 +0000)]
zebra: change fpm_read to batch the messages

Make code changes in fpm_read to create a list of ctx and send it to
zebra for processing rather than sending individual ctx

Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
2 weeks agotests: add nb test binary to .gitignore 18662/head
Mark Stapp [Tue, 15 Apr 2025 17:16:07 +0000 (13:16 -0400)]
tests: add nb test binary to .gitignore

Add a northbound unit-test binary product to .gitignore

Signed-off-by: Mark Stapp <mjs@cisco.com>
2 weeks agotests: use little-endian order for libyang api
Mark Stapp [Tue, 15 Apr 2025 17:15:09 +0000 (13:15 -0400)]
tests: use little-endian order for libyang api

Use the expected - little-endian - byte-order for a param
to one of the libyang apis; tests fail on LE architectures
otherwise.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2 weeks agoMerge pull request #18592 from zmw12306/bfd_set_shutdown
Russ White [Tue, 15 Apr 2025 15:34:28 +0000 (11:34 -0400)]
Merge pull request #18592 from zmw12306/bfd_set_shutdown

bfdd: Set bfd.LocalDiag when transitioning to AdminDown

2 weeks agoMerge pull request #18540 from LabNConsulting/chopps/list-entry-done
Russ White [Tue, 15 Apr 2025 15:30:50 +0000 (11:30 -0400)]
Merge pull request #18540 from LabNConsulting/chopps/list-entry-done

lib: nb: add list_entry_done() callback to free resources

2 weeks agoMerge pull request #18610 from lsang6WIND/yang-isisd
Christian Hopps [Tue, 15 Apr 2025 15:25:51 +0000 (10:25 -0500)]
Merge pull request #18610 from lsang6WIND/yang-isisd

fix yang commands that don't have yang attr

2 weeks agotests: Add ability to test ipv6 ra pref64 extension 11224/head 18626/head
Donald Sharp [Wed, 9 Apr 2025 15:20:49 +0000 (11:20 -0400)]
tests: Add ability to test ipv6 ra pref64 extension

This is the test to ensure that the ipv6 ra pref64
extension is working properly..

This is a very simple test.  Enables the feature
on r1 to send out the ra's once every 3 seconds
with the feature turned on.  Then on r2 ensure
that we see the ra with the appropriate values.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 weeks agotests: add external RFC8781 receiver tool
David Lamparter [Wed, 9 Apr 2025 13:53:43 +0000 (15:53 +0200)]
tests: add external RFC8781 receiver tool

Otherwise pretty much impossible to test this within the current
limitations of topotests.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 weeks agozebra: implement RFC8781 (NAT64 prefix in RAs)
David Lamparter [Sun, 28 Jul 2019 07:28:45 +0000 (09:28 +0200)]
zebra: implement RFC8781 (NAT64 prefix in RAs)

This tells hosts on the subnet if (and which) NAT64 prefix is in use.
Useful for things like xlat464, or local dns64.

Updated from the previous -03 draft implementation.  (PLC field did not
exist before.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 weeks agoMerge pull request #18653 from louis-6wind/fix-bgp-pbr-mem-leaks
Donatas Abraitis [Tue, 15 Apr 2025 07:07:14 +0000 (10:07 +0300)]
Merge pull request #18653 from louis-6wind/fix-bgp-pbr-mem-leaks

bgpd: fix pbr memory leaks

2 weeks agotests: Resource leak in common_config.py 18658/head
Y Bharath [Tue, 15 Apr 2025 05:47:14 +0000 (11:17 +0530)]
tests: Resource leak in common_config.py

Address pending changes from PR:18574

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2 weeks agobgpd: Add function to filter extended communities
Xiao Liang [Fri, 11 Apr 2025 07:28:54 +0000 (15:28 +0800)]
bgpd: Add function to filter extended communities

Support filtering extended communities with a callback. So that we can
strip multiple values in one pass.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
2 weeks agoMerge pull request #18655 from mjstapp/fix_clang_lib_bgp
Jafar Al-Gharaibeh [Tue, 15 Apr 2025 02:10:49 +0000 (21:10 -0500)]
Merge pull request #18655 from mjstapp/fix_clang_lib_bgp

lib,bgpd: clean up clang warnings

2 weeks agoMerge pull request #18654 from chdxD1/v4-via-v6-nexthop
Donald Sharp [Mon, 14 Apr 2025 23:28:48 +0000 (19:28 -0400)]
Merge pull request #18654 from chdxD1/v4-via-v6-nexthop

Add v4-via-v6 nexthop support to staticd

2 weeks agoMerge pull request #18641 from donaldsharp/fpm_listener_storage
Jafar Al-Gharaibeh [Mon, 14 Apr 2025 20:21:13 +0000 (15:21 -0500)]
Merge pull request #18641 from donaldsharp/fpm_listener_storage

zebra: Add ability to dump routes received from fpm_listener

2 weeks agolib,bgpd: clean up clang warnings 18655/head
Mark Stapp [Mon, 14 Apr 2025 19:32:08 +0000 (15:32 -0400)]
lib,bgpd: clean up clang warnings

Clean up a couple of clang compiler warnings (this was
clang 18)

Signed-off-by: Mark Stapp <mjs@cisco.com>
2 weeks agoMerge pull request #18578 from ak503/pim6_use_source
Jafar Al-Gharaibeh [Mon, 14 Apr 2025 19:07:26 +0000 (14:07 -0500)]
Merge pull request #18578 from ak503/pim6_use_source

pim6d: fix missing 'use-source' interface command

2 weeks agotopotests: introduce evpn next-hop tests 18158/head
Christopher Dziomba [Tue, 25 Mar 2025 16:11:46 +0000 (17:11 +0100)]
topotests: introduce evpn next-hop tests

Adding tests in the bgp_evpn_rt5 topology to cover the changed
bgp -> zebra interaction that does no longer rely on withdrawing and
then re-installing the route. The newly introduced pathCount of EVPN
next-hops is checked. In addition the log is checked for MAC_DELETE or
NEIGH_DELETE during multipath flaps that must no longer be present for
the test to succeed.

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2 weeks agodoc: Add v4-over-v6 next-hop to staticd docs 18654/head
Christopher Dziomba [Mon, 14 Apr 2025 17:28:13 +0000 (19:28 +0200)]
doc: Add v4-over-v6 next-hop to staticd docs

GATEWAY can now be v4 or v6 for v4 routes, for v6 routes it
can only be v6 (like today).

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2 weeks agotests: Validating staticd v4-over-v6 nexthop
Christopher Dziomba [Mon, 14 Apr 2025 17:23:16 +0000 (19:23 +0200)]
tests: Validating staticd v4-over-v6 nexthop

Introducing do_ipv6_nexthop to static_simple topotest. The test
configures IPv4 routes with IPv6 nexthop and validates that via
inet6 is visible in the Linux Kernel

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2 weeks agostaticd: Add v4-via-v6 nexthop support
Christopher Dziomba [Mon, 14 Apr 2025 17:13:45 +0000 (19:13 +0200)]
staticd: Add v4-via-v6 nexthop support

Routing v4 over an v6 nexthop is already well supported within zebra
(and FRR). This adds support to staticd, allowing an IPv6 nexthop to
be provided to ip route statements. For this the commands are
extended and the address family is parsed from the parameter.

When receiving nht updates from zebra, both AFIs are checked because
prefixes could exist in both. Additionally when route_node is known,
family of prefix is used instead of nexthop.

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2 weeks agobgpd: fix bgp_pbr_or_filter memory leaks 18653/head
Louis Scalbert [Fri, 11 Apr 2025 15:39:28 +0000 (17:39 +0200)]
bgpd: fix bgp_pbr_or_filter memory leaks

Note that bgp_pbr_policyroute_add_from_zebra() and
bgp_pbr_policyroute_remove_from_zebra() are only called from
bgp_pbr_handle_entry().

>  ==966967==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 40 byte(s) in 1 object(s) allocated from:
>     #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fd44746f8dd in qcalloc lib/memory.c:105
>     #2 0x7fd44744401a in list_new lib/linklist.c:49
>     #3 0x560f8c094490 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2818
>     #4 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941
>     #5 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618
>     #6 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691
>     #7 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856
>     #8 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955
>     #9 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980
>     #10 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282
>     #11 0x7fd4475779b2 in event_call lib/event.c:2011
>     #12 0x7fd447442ff1 in frr_run lib/libfrr.c:1216
>     #13 0x560f8bef0a15 in main bgpd/bgp_main.c:545
>     #14 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Direct leak of 40 byte(s) in 1 object(s) allocated from:
>     #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fd44746f8dd in qcalloc lib/memory.c:105
>     #2 0x7fd44744401a in list_new lib/linklist.c:49
>     #3 0x560f8c09439d in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2812
>     #4 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941
>     #5 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618
>     #6 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691
>     #7 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856
>     #8 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955
>     #9 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980
>     #10 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282
>     #11 0x7fd4475779b2 in event_call lib/event.c:2011
>     #12 0x7fd447442ff1 in frr_run lib/libfrr.c:1216
>     #13 0x560f8bef0a15 in main bgpd/bgp_main.c:545
>     #14 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Direct leak of 4 byte(s) in 1 object(s) allocated from:
>     #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fd44746f8dd in qcalloc lib/memory.c:105
>     #2 0x560f8c080cec in bgp_pbr_extract_enumerate_unary bgpd/bgp_pbr.c:362
>     #3 0x560f8c080f7e in bgp_pbr_extract_enumerate bgpd/bgp_pbr.c:400
>     #4 0x560f8c094530 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2819
>     #5 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941
>     #6 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618
>     #7 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691
>     #8 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856
>     #9 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955
>     #10 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980
>     #11 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282
>     #12 0x7fd4475779b2 in event_call lib/event.c:2011
>     #13 0x7fd447442ff1 in frr_run lib/libfrr.c:1216
>     #14 0x560f8bef0a15 in main bgpd/bgp_main.c:545
>     #15 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Direct leak of 4 byte(s) in 1 object(s) allocated from:
>     #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fd44746f8dd in qcalloc lib/memory.c:105
>     #2 0x560f8c080cec in bgp_pbr_extract_enumerate_unary bgpd/bgp_pbr.c:362
>     #3 0x560f8c080f7e in bgp_pbr_extract_enumerate bgpd/bgp_pbr.c:400
>     #4 0x560f8c09443d in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2813
>     #5 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941
>     #6 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618
>     #7 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691
>     #8 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856
>     #9 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955
>     #10 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980
>     #11 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282
>     #12 0x7fd4475779b2 in event_call lib/event.c:2011
>     #13 0x7fd447442ff1 in frr_run lib/libfrr.c:1216
>     #14 0x560f8bef0a15 in main bgpd/bgp_main.c:545
>     #15 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agobgpd: fix bgp_pbr_rule memory leak
Louis Scalbert [Fri, 11 Apr 2025 15:30:15 +0000 (17:30 +0200)]
bgpd: fix bgp_pbr_rule memory leak

Fix bgp_pbr_rule memory leak. Found by code review.

Fixes: 27e376d4e1 ("bgpd: an hash list of pbr iprule is created")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agobgpd: fix bgp_pbr_match memory leak
Louis Scalbert [Fri, 11 Apr 2025 15:21:49 +0000 (17:21 +0200)]
bgpd: fix bgp_pbr_match memory leak

> Direct leak of 1144 byte(s) in 13 object(s) allocated from:
>     #0 0x7f3eedeb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7f3eed86f8dd in qcalloc lib/memory.c:105
>     #2 0x55b32d236faf in bgp_pbr_match_alloc_intern bgpd/bgp_pbr.c:1074
>     #3 0x7f3eed817d79 in hash_get lib/hash.c:147
>     #4 0x55b32d242d9a in bgp_pbr_policyroute_add_to_zebra_unit bgpd/bgp_pbr.c:2486
>     #5 0x55b32d244436 in bgp_pbr_policyroute_add_to_zebra bgpd/bgp_pbr.c:2672
>     #6 0x55b32d245a05 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2843
>     #7 0x55b32d246912 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2939
>     #8 0x55b32d3c7472 in bgp_zebra_announce bgpd/bgp_zebra.c:1618
>     #9 0x55b32d26e5e7 in bgp_process_main_one bgpd/bgp_route.c:3691
>     #10 0x55b32d26f77d in process_subq_other_route bgpd/bgp_route.c:3856
>     #11 0x55b32d2701ff in process_subq bgpd/bgp_route.c:3955
>     #12 0x55b32d27029f in meta_queue_process bgpd/bgp_route.c:3980
>     #13 0x7f3eed99fdd8 in work_queue_run lib/workqueue.c:282
>     #14 0x7f3eed97798e in event_call lib/event.c:2011
>     #15 0x7f3eed842ff1 in frr_run lib/libfrr.c:1216
>     #16 0x55b32d0a1a15 in main bgpd/bgp_main.c:545
>     #17 0x7f3eed229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: d114b0d739 ("bgpd: inject policy route entry from bgp into zebra pbr entries.")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agobgpd: fix bgp_pbr_match_entry memory leak
Louis Scalbert [Fri, 11 Apr 2025 15:11:55 +0000 (17:11 +0200)]
bgpd: fix bgp_pbr_match_entry memory leak

> ==238132==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 160 byte(s) in 1 object(s) allocated from:
>     #0 0x7fd79f0b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fd79ea6f8dd in qcalloc lib/memory.c:105
>     #2 0x5586b26995f9 in bgp_pbr_match_entry_alloc_intern bgpd/bgp_pbr.c:1155
>     #3 0x7fd79ea17d79 in hash_get lib/hash.c:147
>     #4 0x5586b26a551d in bgp_pbr_policyroute_add_to_zebra_unit bgpd/bgp_pbr.c:2522
>     #5 0x5586b26a6436 in bgp_pbr_policyroute_add_to_zebra bgpd/bgp_pbr.c:2672
>     #6 0x5586b26a8089 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2876
>     #7 0x5586b26a8912 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2939
>     #8 0x5586b2829472 in bgp_zebra_announce bgpd/bgp_zebra.c:1618
>     #9 0x5586b282ab4b in bgp_zebra_announce_table bgpd/bgp_zebra.c:1766
>     #10 0x5586b2824b99 in bgp_zebra_tm_connect bgpd/bgp_zebra.c:1091
>     #11 0x7fd79eb7798e in event_call lib/event.c:2011
>     #12 0x7fd79ea42ff1 in frr_run lib/libfrr.c:1216
>     #13 0x5586b2503a15 in main bgpd/bgp_main.c:545
>     #14 0x7fd79e429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: d114b0d739 ("bgpd: inject policy route entry from bgp into zebra pbr entries.")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agoMerge pull request #18649 from donaldsharp/rpki_testing_and_buf_fix
Jafar Al-Gharaibeh [Sun, 13 Apr 2025 03:26:19 +0000 (22:26 -0500)]
Merge pull request #18649 from donaldsharp/rpki_testing_and_buf_fix

Rpki testing and bug fix

2 weeks agotests: Add more tests to bgp_rpki_topo1 test 18649/head
Donald Sharp [Sat, 12 Apr 2025 20:32:34 +0000 (16:32 -0400)]
tests: Add more tests to bgp_rpki_topo1 test

Looking at the gcov of the rpki code, I noticed
that there was some functionality that is not
covered in our test suites.  Add the functionality.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2 weeks agobgpd: Prevent crash when issuing a show rpki connections
Donald Sharp [Sat, 12 Apr 2025 20:56:30 +0000 (16:56 -0400)]
bgpd: Prevent crash when issuing a show rpki connections

When attempting to check rpki status and the connection
has been turned off, let's check to see if we are connected
before we ask the rpki subsystem, else we will get a crash
in the rpki library.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2 weeks agopim6d: fix missing 'use-source' interface command 18578/head
Dmitrii Turlupov [Tue, 8 Apr 2025 12:45:53 +0000 (15:45 +0300)]
pim6d: fix missing 'use-source' interface command

Signed-off-by: Dmitrii Turlupov <turlupov@bk.ru>
2 weeks agoMerge pull request #18645 from louis-6wind/fix-zebra-pbr-leak
Donald Sharp [Fri, 11 Apr 2025 23:54:03 +0000 (19:54 -0400)]
Merge pull request #18645 from louis-6wind/fix-zebra-pbr-leak

zebra: fix pbr_iptable memory leak

2 weeks agoMerge pull request #18574 from y-bharath14/srib-tests-v10
Donatas Abraitis [Fri, 11 Apr 2025 15:54:01 +0000 (18:54 +0300)]
Merge pull request #18574 from y-bharath14/srib-tests-v10

tests: Shadowing the built-in function

2 weeks agoMerge pull request #18628 from raja-rajasekar/rajasekarr/fix_frr_reload_srv6
Carmine Scarpitta [Fri, 11 Apr 2025 15:07:05 +0000 (17:07 +0200)]
Merge pull request #18628 from raja-rajasekar/rajasekarr/fix_frr_reload_srv6

tools: fix reload script for SRv6 locators and formats

2 weeks agoMerge pull request #18640 from donaldsharp/fpm_listener_nhg_data
Jafar Al-Gharaibeh [Fri, 11 Apr 2025 15:06:55 +0000 (10:06 -0500)]
Merge pull request #18640 from donaldsharp/fpm_listener_nhg_data

zebra: modify fpm_listener to display data about nhgs

2 weeks agoMerge pull request #18597 from pguibert6WIND/end_b6_encaps_extensions
Carmine Scarpitta [Fri, 11 Apr 2025 15:00:13 +0000 (17:00 +0200)]
Merge pull request #18597 from pguibert6WIND/end_b6_encaps_extensions

lib, staticd, isisd: add B6.ENCAPS codepoint extensions

2 weeks agozebra: clean pbr_iptable interface_name_list free 18645/head
Louis Scalbert [Fri, 11 Apr 2025 13:13:23 +0000 (15:13 +0200)]
zebra: clean pbr_iptable interface_name_list free

Clean up code related to pbr_iptable->interface_name_list free. This is
a cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agozebra: fix pbr_iptable memory leak
Louis Scalbert [Fri, 11 Apr 2025 13:20:13 +0000 (15:20 +0200)]
zebra: fix pbr_iptable memory leak

We are obviously doing deleting on wrong object.

> Direct leak of 40 byte(s) in 1 object(s) allocated from:
>     #0 0x7fcf718b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fcf7126f8dd in qcalloc lib/memory.c:105
>     #2 0x7fcf7124401a in list_new lib/linklist.c:49
>     #3 0x55771621d86d in pbr_iptable_alloc_intern zebra/zebra_pbr.c:1015
>     #4 0x7fcf71217d79 in hash_get lib/hash.c:147
>     #5 0x55771621dad3 in zebra_pbr_add_iptable zebra/zebra_pbr.c:1030
>     #6 0x55771614d00c in zread_iptable zebra/zapi_msg.c:4131
>     #7 0x55771614e586 in zserv_handle_commands zebra/zapi_msg.c:4424
>     #8 0x5577162dae2c in zserv_process_messages zebra/zserv.c:521
>     #9 0x7fcf7137798e in event_call lib/event.c:2011
>     #10 0x7fcf71242ff1 in frr_run lib/libfrr.c:1216
>     #11 0x5577160e4d6d in main zebra/main.c:540
>     #12 0x7fcf70c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Indirect leak of 24 byte(s) in 1 object(s) allocated from:
>     #0 0x7fcf718b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7fcf7126f8dd in qcalloc lib/memory.c:105
>     #2 0x7fcf71244129 in listnode_new lib/linklist.c:71
>     #3 0x7fcf71244238 in listnode_add lib/linklist.c:92
>     #4 0x55771621d938 in pbr_iptable_alloc_intern zebra/zebra_pbr.c:1019
>     #5 0x7fcf71217d79 in hash_get lib/hash.c:147
>     #6 0x55771621dad3 in zebra_pbr_add_iptable zebra/zebra_pbr.c:1030
>     #7 0x55771614d00c in zread_iptable zebra/zapi_msg.c:4131
>     #8 0x55771614e586 in zserv_handle_commands zebra/zapi_msg.c:4424
>     #9 0x5577162dae2c in zserv_process_messages zebra/zserv.c:521
>     #10 0x7fcf7137798e in event_call lib/event.c:2011
>     #11 0x7fcf71242ff1 in frr_run lib/libfrr.c:1216
>     #12 0x5577160e4d6d in main zebra/main.c:540
>     #13 0x7fcf70c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: f80ec7e3d6 ("zebra: handle iptable list of interfaces")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agozebra: split up MTYPE_PBR_OBJ
Louis Scalbert [Fri, 11 Apr 2025 09:12:52 +0000 (11:12 +0200)]
zebra: split up MTYPE_PBR_OBJ

Split up MTYPE_PBR_OBJ into dedicated MTYPE to clarify the memory
allocation and free.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 weeks agoMerge pull request #18642 from louis-6wind/fix-asla-leak
Donald Sharp [Fri, 11 Apr 2025 13:07:27 +0000 (09:07 -0400)]
Merge pull request #18642 from louis-6wind/fix-asla-leak

isisd: fix asla memory leak