summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2025-02-26 00:24:49 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2025-03-03 07:25:30 +0000
commitf0cb5511b109b4ec2604247adcf25816528ee48d (patch)
tree67650e7ebda5787c3b66d6fb5d118a55d1a17d74
parenta4a3926582860dd684917b065738c512a25eca02 (diff)
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> (cherry picked from commit b94be4a1c5ad6de7547a64d20a2f5124780fe4e7)
-rw-r--r--staticd/static_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c
index 13a61e52c7..a6b4415e28 100644
--- a/staticd/static_vty.c
+++ b/staticd/static_vty.c
@@ -1159,7 +1159,7 @@ DEFUN_NOSH (static_srv6, static_srv6_cmd,
return CMD_SUCCESS;
}
-DEFUN_YANG_NOSH (no_static_srv6, no_static_srv6_cmd,
+DEFUN_YANG (no_static_srv6, no_static_srv6_cmd,
"no srv6",
NO_STR
"Segment Routing SRv6\n")