Commit graph

317 commits

Author SHA1 Message Date
Mark Stapp 098d692b6f *: expose and clean up 'noreturn' functions
Enable the -Wmissing-noreturn warning, and resolve warnings
for gcc and clang. Add a FRR_NORETURN macro and use that for
the new changes.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-24 13:41:23 -04:00
Christopher Dziomba 8fc41e81f0
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>
2025-04-14 19:22:39 +02:00
Philippe Guibert 27fa9ac4db lib, staticd, isisd: add B6.Encaps codepoint extensions
Add codepoint extensions for END.B6.Encaps instruction.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-04-11 09:36:29 +02:00
Mark Stapp 2998eeb0a5 pbrd,staticd,vrrpd: clean up variable-shadow warnings
Clean up -Wshadow warnings in three daemons

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Rajasekar Raja dbd9fed0b3 staticd: Avoid requesting SRv6 sid from zebra when loc and sid block dont match
Currently, when the locator block and sid block differs, staticd would
still go ahead and request zebra to allocate the SID which it does if
there is atleast one match (from any locators).

Only when staticd tries to install the route, it sees that the locator
block and sid block are different and avoids installing the route.

Fix:
Check if the locator block and sid block match before even requesting
Zebra to allocate one.

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2025-04-07 10:34:07 -07:00
Carmine Scarpitta 6037ea350c staticd: Fix crash that occurs when modifying an SRv6 SID
When the user modifies an SRv6 SID and then removes all SIDs, staticd
crashes:

```
2025/03/23 08:37:22.691860 STATIC: lib/memory.c:74: mt_count_free(): assertion (mt->n_alloc) failed
STATIC: Received signal 6 at 1742715442 (si_addr 0x8200007cf0); aborting...
STATIC: zlog_signal+0x390                  fcc704a844b8     ffffd7450390 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: core_handler+0x1f8                 fcc704b79990     ffffd7450590 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC:     ---- signal ----
STATIC: ?                                  fcc705c008f8     ffffd74507a0 linux-vdso.so.1 (mapped at 0xfcc705c00000)
STATIC: pthread_key_delete+0x1a0           fcc70458f1f0     ffffd7451a00 /lib/aarch64-linux-gnu/libc.so.6 (mapped at 0xfcc704510000)
STATIC: raise+0x1c                         fcc70454a67c     ffffd7451ad0 /lib/aarch64-linux-gnu/libc.so.6 (mapped at 0xfcc704510000)
STATIC: abort+0xe4                         fcc704537130     ffffd7451af0 /lib/aarch64-linux-gnu/libc.so.6 (mapped at 0xfcc704510000)
STATIC: _zlog_assert_failed+0x3c4          fcc704c407c8     ffffd7451c40 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: mt_count_free+0x12c                fcc704a93c74     ffffd7451dc0 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: qfree+0x28                         fcc704a93fa0     ffffd7451e70 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: static_srv6_sid_free+0x1c          adc1df8fa544     ffffd7451e90 /usr/lib/frr/staticd (mapped at 0xadc1df8a0000)
STATIC: delete_static_srv6_sid+0x14        adc1df8faafc     ffffd7451eb0 /usr/lib/frr/staticd (mapped at 0xadc1df8a0000)
STATIC: list_delete_all_node+0x104         fcc704a60eec     ffffd7451ed0 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: list_delete+0x8c                   fcc704a61054     ffffd7451f00 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: static_srv6_cleanup+0x20           adc1df8fabdc     ffffd7451f20 /usr/lib/frr/staticd (mapped at 0xadc1df8a0000)
STATIC: sigint+0x40                        adc1df8be544     ffffd7451f30 /usr/lib/frr/staticd (mapped at 0xadc1df8a0000)
STATIC: frr_sigevent_process+0x148         fcc704b79460     ffffd7451f40 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: event_fetch+0x1c4                  fcc704bc0834     ffffd7451f60 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: frr_run+0x650                      fcc704a5d230     ffffd7452080 /usr/lib/frr/libfrr.so.0 (mapped at 0xfcc704800000)
STATIC: main+0x1d0                         adc1df8be75c     ffffd7452270 /usr/lib/frr/staticd (mapped at 0xadc1df8a0000)
STATIC: __libc_init_first+0x7c             fcc7045373fc     ffffd74522b0 /lib/aarch64-linux-gnu/libc.so.6 (mapped at 0xfcc704510000)
STATIC: __libc_start_main+0x98             fcc7045374cc     ffffd74523c0 /lib/aarch64-linux-gnu/libc.so.6 (mapped at 0xfcc704510000)
STATIC: _start+0x30                        adc1df8be0f0     ffffd7452420 /usr/lib/frr/staticd (mapped at 0xadc1df8a0000)
```

Tracking this down, the crash occurs because every time we modify a
SID, staticd executes some callbacks to modify the SID and finally it
calls `apply_finish`, which re-adds the SID to the list `srv6_sids`.

This leads to having the same SID multiple times in the `srv6_sids`
list. When we delete all SIDs, staticd attempts to deallocate the same
SID multiple times, which leads to the crash.

This commit fixes the issue by moving the code that adds the SID to the
list from the `apply_finish` callback to the `create` callback.
This ensures that the SID is inserted into the list only once, when it
is created. For all subsequent modifications, the SID is modified but
not added to the list.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-03-23 18:46:45 +01:00
Donald Sharp 918a1f85c2 staticd: Install known nexthops upon connection with zebra
CI tests are showing cases where staticd is connecting to
zebra after config is read in and the nexthops are never
being registered w/ zebra:

2025/03/11 15:39:44 STATIC: [T83RR-8SM5G] staticd 10.4-dev starting: vty@2616
2025/03/11 15:39:45 STATIC: [GH3PB-C7X4Y] Static Route to 13.13.13.13/32 not installed currently because dependent config not fully available
2025/03/11 15:39:45 STATIC: [RHJK1-M5FAR] static_zebra_nht_register: Failure to send nexthop 1.1.1.2/32 for 11.11.11.11/32 to zebra
2025/03/11 15:39:45 STATIC: [M7Q4P-46WDR] vty[14]@> enable

Zebra shows connection time as:

2025/03/11 15:39:45.933343 ZEBRA: [V98V0-MTWPF] client 5 says hello and bids fair to announce only static routes vrf=0

As a result staticd never installs the route because it has no nexthop
tracking to say that the route could be installed.

Modify staticd on startup to go through it's nexthops and dump them to
zebra to allow the staticd state machine to get to work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-03-12 08:30:43 -04:00
Carmine Scarpitta b94be4a1c5 staticd: Fix no srv6 command
A user can configure static SIDs as follows:

[...]
segment-routing
 srv6
  static-sids
   sid fcbb:bbbb:1::/48 locator MAIN behavior uN
   sid fcbb:bbbb:1:fe00::/64 locator MAIN behavior uDT46
[...]

When the user runs vtysh and executes the `no srv6` command, the
expectation is that staticd will deallocate all SIDs.

However, currently FRR does not behaves as expected. After the user
executes `no srv6`, the SIDs are still present.

The problem is that vtysh does not forward the `no srv6` command to
mgmtd/staticd.

The `no srv6` command is defined using the `DEFUN_YANG_NOSH` macro,
which instructs `xref2vtysh.py` to skip the `no srv6` command during
the generation of `vtysh_cmd.c`. As a result, vtysh is unaware that it
should forward the `no srv6` command to mgmtd/staticd.

This commit fixes the issue by replacing `DEFUN_YANG_NOSH` with
`DEFUN_YANG`. This change ensures that `xref2vtysh.py` includes the
`no srv6` command when generating `vtysh_cmd.c` and makes vtysh forward
the `no srv6` command to mgmtd/staticd.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-03-01 23:24:46 +01:00
Donald Sharp 08af876bdc
Merge pull request #18263 from cscarpitta/fix/add_no_form_for_static_sids_cli
staticd: Add `no` form for `static-sids` command
2025-02-28 09:14:57 -05:00
Carmine Scarpitta ab7a7541a6 staticd: Add no form for static-sids command
Currently, when the user tries to delete all static SIDs with the
`no static-sids` command, staticd returns an error.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
% Unknown command: no  static-sids
```

The problem is the `static-sids` command does not support the `no` form.

This PR enables the `no` form for the `static-sids` command.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-27 12:17:26 +01:00
Carmine Scarpitta e7640f3885 staticd: Convert static-sids command to DEFPY
This commit converts the `static-sids` command from `DEFUN` to `DEFPY`
to simplify the parsing of the command string definition.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-27 12:14:02 +01:00
Carmine Scarpitta a138ce525d staticd: Do not log uninitialized nexthop variable
When running valgrind, the following error is observed.

```
==2474568== Memcheck, a memory error detector
==2474568== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2474568== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==2474568== Command: /usr/lib/frr/staticd --command-log-always --log file:staticd.log --log-level debug -d
==2474568== Parent PID: 2474525
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B32A: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B334: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B343: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B34D: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B35B: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B367: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B6B9: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B6C6: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B3AA: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B708: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B711: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B3DE: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B3E8: inet_ntop (ntop.c:105)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B499: puthex (ntop.c:64)
==2474568==    by 0x490B499: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B73D: puthex (ntop.c:66)
==2474568==    by 0x490B73D: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Conditional jump or move depends on uninitialised value(s)
==2474568==    at 0x490B747: puthex (ntop.c:68)
==2474568==    by 0x490B747: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Use of uninitialised value of size 8
==2474568==    at 0x490B4D2: puthex (ntop.c:69)
==2474568==    by 0x490B4D2: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Use of uninitialised value of size 8
==2474568==    at 0x490B4DD: puthex (ntop.c:70)
==2474568==    by 0x490B4DD: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Use of uninitialised value of size 8
==2474568==    at 0x490B4A8: puthex (ntop.c:65)
==2474568==    by 0x490B4A8: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== Use of uninitialised value of size 8
==2474568==    at 0x490B4BC: puthex (ntop.c:67)
==2474568==    by 0x490B4BC: inet_ntop (ntop.c:150)
==2474568==    by 0x49AB9CB: printfrr_i6 (prefix.c:1614)
==2474568==    by 0x4A24B19: printfrr_extp (glue.c:220)
==2474568==    by 0x4A2286E: vbprintfrr (vfprintf.c:626)
==2474568==    by 0x4A12AE2: zlog_msg_text (zlog.c:838)
==2474568==    by 0x4A11B83: vzlog_tls (zlog.c:497)
==2474568==    by 0x4A12561: vzlogx (zlog.c:722)
==2474568==    by 0x129AE8: zlog_ref (zlog.h:84)
==2474568==    by 0x12BD35: routing_control_plane_protocols_control_plane_protocol_staticd_segment_routing_srv6_local_sids_sid_paths_next_hop_modify (static_nb_config.c:1299)
==2474568==    by 0x498ABF8: nb_callback_modify (northbound.c:1579)
==2474568==    by 0x498BB35: nb_callback_configuration (northbound.c:1930)
==2474568==    by 0x498A03C: nb_candidate_validate_code (northbound.c:1287)
==2474568==    by 0x498A2C1: nb_candidate_commit_prepare (northbound.c:1358)
==2474568==    by 0x496F414: mgmt_be_txn_cfg_prepare (mgmt_be_client.c:579)
==2474568==    by 0x496FBB8: mgmt_be_process_cfgdata_req (mgmt_be_client.c:717)
==2474568==    by 0x49703A9: mgmt_be_client_handle_msg (mgmt_be_client.c:851)
==2474568==    by 0x49718B9: mgmt_be_client_process_msg (mgmt_be_client.c:1261)
==2474568==    by 0x4976810: mgmt_msg_procbufs (mgmt_msg.c:193)
==2474568==    by 0x497771A: msg_conn_proc_msgs (mgmt_msg.c:526)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568==
==2474568== HEAP SUMMARY:
==2474568==     in use at exit: 2,098 bytes in 8 blocks
==2474568==   total heap usage: 48,668 allocs, 48,660 frees, 15,837,383 bytes allocated
==2474568==
==2474568== 69 bytes in 1 blocks are still reachable in loss record 3 of 8
==2474568==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2474568==    by 0x4D2058E: strdup (strdup.c:42)
==2474568==    by 0x496CA96: qstrdup (memory.c:118)
==2474568==    by 0x4A1DD4B: zlog_file_set_filename (zlog_targets.c:244)
==2474568==    by 0x4969ADA: set_log_file (log_vty.c:371)
==2474568==    by 0x4969CD0: command_setup_early_logging (log_vty.c:419)
==2474568==    by 0x49576FE: frr_init (libfrr.c:770)
==2474568==    by 0x1156C6: main (static_main.c:164)
==2474568==
==2474568== 69 bytes in 1 blocks are still reachable in loss record 4 of 8
==2474568==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2474568==    by 0x4D2058E: strdup (strdup.c:42)
==2474568==    by 0x496CA96: qstrdup (memory.c:118)
==2474568==    by 0x4A1DD4B: zlog_file_set_filename (zlog_targets.c:244)
==2474568==    by 0x4969ADA: set_log_file (log_vty.c:371)
==2474568==    by 0x496A052: config_log_file_magic (log_vty.c:542)
==2474568==    by 0x496845F: config_log_file (log_vty_clippy.c:148)
==2474568==    by 0x4915E8B: cmd_execute_command_real (command.c:1003)
==2474568==    by 0x4916004: cmd_execute_command (command.c:1062)
==2474568==    by 0x49165B4: cmd_execute (command.c:1228)
==2474568==    by 0x49EB7EA: vty_command (vty.c:626)
==2474568==    by 0x49ED70E: vty_execute (vty.c:1389)
==2474568==    by 0x49EFF39: vtysh_read (vty.c:2408)
==2474568==    by 0x49E40E2: event_call (event.c:2019)
==2474568==    by 0x4958AD9: frr_run (libfrr.c:1246)
==2474568==    by 0x11581D: main (static_main.c:193)
==2474568==
==2474568== LEAK SUMMARY:
==2474568==    definitely lost: 0 bytes in 0 blocks
==2474568==    indirectly lost: 0 bytes in 0 blocks
==2474568==      possibly lost: 0 bytes in 0 blocks
==2474568==    still reachable: 138 bytes in 2 blocks
==2474568==         suppressed: 1,960 bytes in 6 blocks
==2474568==
==2474568== Use --track-origins=yes to see where uninitialised values come from
==2474568== For lists of detected and suppressed errors, rerun with: -s
==2474568== ERROR SUMMARY: 41 errors from 20 contexts (suppressed: 0 from 0)
```

The error is caused by staticd attempting to log the `nexthop` variable
before it is initialized.

Since logging that variable currently does not work and would not
provide any useful information anyway, this commit fixes the problem by
changing the staticd code to not log that variable.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-27 09:35:28 +01:00
Russ White 9a939d6ed6
Merge pull request #18198 from cscarpitta/feature/srv6_staticd_ua
staticd: Add support for SRv6 uA behavior
2025-02-26 09:52:08 -05:00
Carmine Scarpitta 062fd00ad6 staticd: Extend SRv6 SIDs show CLI to display uA SIDs
This commit extends the SRv6 SIDs show CLI to display the configured
SRv6 uA SIDs.

```
segment-routing
 srv6
  static-sids
   sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
  !
 !
!
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:52 +01:00
Carmine Scarpitta f2fcdaad3a staticd: Extend CLI to unconfigure an SRv6 uA SID
This commit extends the STATIC CLI to support the deletion of uA SIDs.

```
router(config)# no sid fcbb:bbbb:1:fe00::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:52 +01:00
Carmine Scarpitta 70c039baa8 staticd: Extend CLI to configure an SRv6 uA SID
This commit extends the STATIC CLI to support the configuration of uA
SIDs.

```
router(config)# sid fcbb:bbbb:1:fe00::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:52 +01:00
Carmine Scarpitta 95abf9d678 staticd: Extend static_zebra_srv6_sid_uninstall to uninstall SRv6 uA SIDs
This commit extends the `static_zebra_srv6_sid_uninstall` function to
allow staticd to remove SRv6 uA SIDs from the zebra RIB.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:52 +01:00
Carmine Scarpitta ae6fb9196a staticd: Extend static_zebra_srv6_sid_install to install SRv6 uA SIDs
This commit extends the `static_zebra_srv6_sid_install` function to
allow staticd to install SRv6 uA SIDs into the zebra RIB.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:52 +01:00
Carmine Scarpitta cc84e52281 staticd: Extend static_zebra_release_srv6_sid to release SRv6 uA SIDs
When removing an SRv6 uA SID, staticd should ask SRv6 SID Manager to
release the SID.
Currently, `static_zebra_release_srv6_sid` does not allow to release uA
SIDs.

This commit extends `static_zebra_release_srv6_sid` to allow staticd to
release SRv6 uA SIDs.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:51 +01:00
Carmine Scarpitta ec5ff367b1 staticd: Extend static_zebra_request_srv6_sid to request SRv6 uA SIDs
In order to configure an SRv6 uA SID in staticd, staticd should request
SRv6 SID Manager to allocate a SID bound to the uA behavior.
Currently, `static_zebra_request_srv6_sid` does not support requesting
SIDs bound to the uA behavior.

This commit extends the `static_zebra_request_srv6_sid` function to
enable staticd to request SIDs bound to the uA behavior.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:51 +01:00
Carmine Scarpitta 646c4f95d9 staticd: Add nb callbacks to configure a nexthop for SRv6 uA behavior
An SRv6 uA SID is associated with the interface and (optionally) the
IPv6 address of the nexthop.

This commit adds the modify and destroy nortbound callbacks required to
set the nexthop.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:51 +01:00
Carmine Scarpitta 7438a94eeb staticd: Add nb callbacks to configure an interface for SRv6 uA behavior
An SRv6 uA SID is associated with the interface and (optionally) the
IPv6 address of the nexthop.

This commit adds the modify and destroy nortbound callbacks required to
set the interface.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:51 +01:00
Donald Sharp da0f552f5d staticd: Fix crash because registering unknown vrf
With recent commit:

c1adc8f1d6 staticd has started to crash
aproximately 1/10 of the tine in the static_vrf topotest

(gdb) bt
0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140400982256064) at ./nptl/pthread_kill.c:44
1  __pthread_kill_internal (signo=6, threadid=140400982256064) at ./nptl/pthread_kill.c:78
2  __GI___pthread_kill (threadid=140400982256064, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
3  0x00007fb1a6442476 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
4  0x00007fb1a6950823 in core_handler (signo=6, siginfo=0x7ffd6d832ff0, context=0x7ffd6d832ec0) at lib/sigevent.c:268
5  <signal handler called>
6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140400982256064) at ./nptl/pthread_kill.c:44
7  __pthread_kill_internal (signo=6, threadid=140400982256064) at ./nptl/pthread_kill.c:78
8  __GI___pthread_kill (threadid=140400982256064, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
9  0x00007fb1a6442476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
10 0x00007fb1a64287f3 in __GI_abort () at ./stdlib/abort.c:79
11 0x00007fb1a699a422 in _zlog_assert_failed (xref=0x55f7dfd3dac0 <_xref.117>,
   extra=0x55f7dfd30c30 "BUG: NH %pFX registered but not in hashtable") at lib/zlog.c:789
12 0x000055f7dfd1201f in static_zebra_nht_register (nh=0x55f7fd2ecd80, reg=true) at staticd/static_zebra.c:333
13 0x000055f7dfd29c9d in static_install_nexthop (nh=0x55f7fd2ecd80) at staticd/static_routes.c:299
14 0x000055f7dfd2a126 in static_fixup_vrf (vrf=0x55f7fd2333a0, stable=0x55f7fd271030, afi=AFI_IP, safi=SAFI_UNICAST)
   at staticd/static_routes.c:441
15 0x000055f7dfd2a2be in static_fixup_vrf_ids (vrf=0x55f7fd2333a0) at staticd/static_routes.c:494
16 0x000055f7dfd15b53 in static_vrf_enable (vrf=0x55f7fd2333a0) at staticd/static_vrf.c:124
17 0x00007fb1a696ffa5 in vrf_enable (vrf=0x55f7fd2333a0) at lib/vrf.c:325
18 0x00007fb1a6991c87 in zclient_vrf_add (cmd=33, zclient=0x55f7fd29f740, length=76, vrf_id=8) at lib/zclient.c:2701
19 0x00007fb1a6996cba in zclient_read (thread=0x7ffd6d834230) at lib/zclient.c:4764
20 0x00007fb1a696bd9b in event_call (thread=0x7ffd6d834230) at lib/event.c:2019
21 0x00007fb1a68e1a3a in frr_run (master=0x55f7fd102e10) at lib/libfrr.c:1246
22 0x000055f7dfd1081e in main (argc=7, argv=0x7ffd6d834478, envp=0x7ffd6d8344b8) at staticd/static_main.c:193

Tracking this down, the crash is because the nh believes that is already
registered but lookup fails, causing this assert.  Looking at the code
static_fixup_vrf is changing the vrf_id.  I put a zlog_debug right
before the change of the nh vrf_id and noticed that the vrf id was
UNKNOWN.  So, the code is attempting to register into zebra the nexthop
with a vrf unknown( which will be ignored ).

Modify the code in the registration process to notice that the nh is
still UNKNOWN and as such nothing should be done.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-22 18:13:15 -05:00
Russ White 5082cab809
Merge pull request #18164 from Pdoijode/pdoijode/staticd-nht-register
staticd: Failed to register nexthop after networking restart
2025-02-18 09:18:29 -05:00
Pooja Jagadeesh Doijode c1adc8f1d6 staticd: Failed to register nexthop after networking restart
Problem:
After networking restart, staticd unregistered the nexthop
but failed to register the nexthop again, which caused the
nexthop to remain inactive in zebra for static route.

Fix:
Call to static_zebra_nht_register() from static_install_path() was
removed in 3c05d53bf8. Adding it back
so that staticd can register the nexthop for static routes.

Testing:
After networking restart trigger on h1:

Before fix:
```
h1# show ipv6 route vrf vrf1012
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP,
       T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       t - Table-Direct, Z - FRR,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF vrf1012:
S   ::/0 [1/0] via 2003:7:2::1, swp1.2 inactive, weight 1, 00:00:39
K>* ::/0 [255/8192] unreachable (ICMP unreachable) (vrf default), 00:00:39
L * 2000:9:12::3/128 is directly connected, vrf1012, 00:00:39
C>* 2000:9:12::3/128 is directly connected, vrf1012, 00:00:39
C>* 2003:7:2::/125 is directly connected, swp1.2, 00:00:37
L>* 2003:7:2::3/128 is directly connected, swp1.2, 00:00:37
C>* fe80::/64 is directly connected, swp1.2, 00:00:37
h1#
```

After fix:
```
h1# show ipv6 route vrf vrf1012

Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP,
       T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       t - Table-Direct, Z - FRR,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF vrf1012:
S>* ::/0 [1/0] via 2003:7:2::1, swp1.2, weight 1, 00:00:15
K * ::/0 [255/8192] unreachable (ICMP unreachable) (vrf default), 00:00:17
L * 2000:9:12::3/128 is directly connected, vrf1012, 00:00:17
C>* 2000:9:12::3/128 is directly connected, vrf1012, 00:00:17
C>* 2003:7:2::/125 is directly connected, swp1.2, 00:00:15
L>* 2003:7:2::3/128 is directly connected, swp1.2, 00:00:15
```

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2025-02-14 12:12:11 -08:00
Philippe Guibert 53263b4b62 isisd, lib: add some codepoints usually shared with other vendors
Some codepoints can not be read by interoperating with CISCO.
This is because PSP/USP flavor are used by default, and the display of
the isis output has to be adapted.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-02-14 15:40:42 +01:00
Carmine Scarpitta e1654ba554 staticd: Fix SRv6 SID installation and deletion
The SRv6 support in staticd (PR #16894) does not set the correct SID
parameters (block length, node length, function length).

This commit fixes the issue and computes the correct parameters.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-08 22:31:19 +01:00
Russ White 063c8cc6e5
Merge pull request #17988 from cscarpitta/feature/srv6-ipv4-traffic-steering
staticd: Add CLI to support steering of IPv4 traffic over SRv6 SID list
2025-02-04 11:45:02 -05:00
Carmine Scarpitta c809035cc4 staticd: Fix wrong xpath in no sid X:X::X:X/M
When a user wants to delete a specific SRv6 SID, he executes the
`no sid X:X::X:X/M` command.
However, by mistake, in addition to deleting the SID requested by the
user, this command also removes all other SIDs.

This happens because `no sid X:X::X:X/M` triggers a destroy operation
on the wrong xpath `frr-staticd:staticd/segment-routing/srv6`.

This commit fixes the issue by replacing the wrong xpath
`frr-staticd:staticd/segment-routing/srv6` with the correct xpath
`frr-staticd:staticd/segment-routing/srv6/static-sids/sid[sid='%s']`.

This ensures that the `no sid X:X::X:X/M` command only deletes the SID
that was requested by the user.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 22:33:00 +01:00
Carmine Scarpitta 39613ec8be staticd: Extend ip_route_vrf CLI to support SRv6 traffic steering
staticd already has a CLI to steer IPv6 traffic over a given SRv6 SID
list:

```
vrf vrf10
 ipv6 route 2001:db8:1:1::/64 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

This PR extends the existing CLI `ip route` to support steering of IPv4
traffic over an SRv6 SID list.

```
vrf vrf10
 ip route 10.0.0.0/24 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 22:20:58 +01:00
Carmine Scarpitta 885181acb4 staticd: Extend ip_route CLI to support SRv6 traffic steering
staticd already has a CLI to steer IPv6 traffic over a given SRv6 SID
list:

```
ipv6 route 2001:db8:1:1::/64 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

This PR extends the existing CLI `ip route` to support steering of IPv4
traffic over an SRv6 SID list.

```
ip route 10.0.0.0/24 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 22:20:34 +01:00
Carmine Scarpitta e1e31e0869 staticd: Extend ip_route_address_interface_vrf to support SRv6 traffic steering
staticd already has a CLI to steer IPv6 traffic over a given SRv6 SID
list:

```
vrf vrf10
 ipv6 route 2001:db8:1:1::/64 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

This PR extends the existing CLI `ip route` to support steering of IPv4
traffic over an SRv6 SID list.

```
vrf vrf10
 ip route 10.0.0.0/24 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 22:20:14 +01:00
Carmine Scarpitta 6f52056f70 staticd: Extend ip_route_address_interface to support SRv6 traffic steering
staticd already has a CLI to steer IPv6 traffic over a given SRv6 SID
list:

```
ipv6 route 2001:db8:1:1::/64 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

This PR extends the existing CLI `ip route` to support steering of IPv4
traffic over an SRv6 SID list.

```
ip route 10.0.0.0/24 sr0 segments fcbb:bbbb:1:2:3:fe00::
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03 22:20:01 +01:00
Carmine Scarpitta 7a46623348 staticd: Fix NULL pointer dereference
When staticd receives a `ZAPI_SRV6_SID_RELEASED` notification from SRv6
SID Manager, it tries to unset the validity flag of `sid`. But since
the `sid` variable is NULL, we get a NULL pointer dereference.

```
=================================================================
==13815==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000060 (pc 0xc14b813d9eac bp 0xffffcb135a40 sp 0xffffcb135a40 T0)
==13815==The signal is caused by a READ memory access.
==13815==Hint: address points to the zero page.
    #0 0xc14b813d9eac in static_zebra_srv6_sid_notify staticd/static_zebra.c:1172
    #1 0xe44e7aa2c194 in zclient_read lib/zclient.c:4746
    #2 0xe44e7a9b69d8 in event_call lib/event.c:1984
    #3 0xe44e7a85ac28 in frr_run lib/libfrr.c:1246
    #4 0xc14b813ccf98 in main staticd/static_main.c:193
    #5 0xe44e7a4773f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #6 0xe44e7a4774c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #7 0xc14b813cc92c in _start (/usr/lib/frr/staticd+0x1c92c)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV staticd/static_zebra.c:1172 in static_zebra_srv6_sid_notify
==13815==ABORTING
```

This commit fixes the problem by doing a SID lookup first. If the SID
can't be found, we log an error and return. If the SID is found, we go
ahead and unset the validity flag.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-02 10:06:22 +01:00
David Lamparter 2726a239d4 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>
2025-01-28 15:40:17 +01:00
David Lamparter 3671ce36fd 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: 88fa5104a0 ("staticd : Configuration northbound implementation")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28 15:40:17 +01:00
Yuqing Zhao 2d23207290 staticd: Add CLIs to show SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao 69a49c7359 staticd: Add CLI for SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao 07ba1cd8b8 staticd: Add Northbound APIs for SRv6
Add Northbound APIs to create/modify/destroy an SRv6 SID

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao 73fdae9bea staticd: Initialize/cleanup SRv6
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao 33615773c4 staticd: Install SIDs when a dependent interface goes up/down
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao e80f24df7e staticd: Request/Release SIDs to SID Manager
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao 807d90050d staticd: Add infrastructure for SRv6
This commit adds datastructures and helper functions required to support SRv6 in staticd.

* List of locators
* List of SIDs
* Data structure to represent an SRv6 SID
* Functions to allocate/deallocate an SRv6 SID
* Functions to allocate, deallocate and lookup a locator
* Function to initialize/Cleanup SRv6

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Yuqing Zhao 57031d43ce staticd: Add debug option for SRv6
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Christian Hopps 5f2a927d7b lib: northbound/mgmtd: add backend model support
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-14 18:48:59 +00:00
guozhongfeng.gzf c2f0206c3c staticd: Reduce the frequency of adding routes
Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
2024-12-27 12:16:17 +08:00
Donald Sharp 645a9e4f83 *: Fix up improper handling of nexthops for nexthop tracking
Currently FRR needs to send a uint16_t value for the number
of nexthops as well it needs the ability to properly decode
all of this.  Find and handle all the places that this happens.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-15 11:57:23 -04:00
Igor Ryzhov 830972cab2 lib: common debug status output
Implement common code for debug status output and remove daemon-specific
code that is duplicated everywhere.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00
Igor Ryzhov 82e52e0f21 lib: common debug config output
Implement common code for debug config output and remove daemon-specific
code that is duplicated everywhere.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00
Igor Ryzhov 5dac696154 lib: rework debug init
The debug library allows to register a `debug_set_all` callback which
should enable all debugs in a daemon. This callback is implemented
exactly the same in each daemon. Instead of duplicating the code, rework
the lib to allow registration of each debug type, and implement the
common code only once in the lib.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00