From dd8b193e8d6b3a85863056cc32a6f57f4b213f39 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Mon, 5 Dec 2022 09:08:23 +0100 Subject: [PATCH] zebra: Add missing newline in SRv6 config write The `behavior usid` command is installed under the SRv6 Locator node in the zebra VTY. However, in the SRv6 config write function this command is wrongly put on the same line as the `prefix X:X::X:X/M` command. This causes a failure when an SRv6 uSID locator is configured in zebra and `frr-reload.py` is used to reload the FRR configuration. This commit prepends a newline character to the `behavior usid` command in the SRv6 config write function. The output of `show running-config` before and after this commit is shown below. Before: ``` Building configuration... Current configuration: ! frr version 8.5-dev ! segment-routing srv6 locators locator loc1 prefix fc00:0:1::/48 block-len 32 node-len 16 behavior usid exit ! exit ! exit ! exit ! end ``` After: ``` Building configuration... Current configuration: ! segment-routing srv6 locators locator loc1 prefix fc00:0:1::/48 block-len 32 node-len 16 behavior usid exit ! exit ! exit ! exit ! end ``` Signed-off-by: Carmine Scarpitta --- zebra/zebra_srv6_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c index 13ad9d71bb..b4fd5f0181 100644 --- a/zebra/zebra_srv6_vty.c +++ b/zebra/zebra_srv6_vty.c @@ -434,9 +434,9 @@ static int zebra_sr_config(struct vty *vty) if (locator->argument_bits_length) vty_out(vty, " arg-len %u", locator->argument_bits_length); - if (CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) - vty_out(vty, " behavior usid"); vty_out(vty, "\n"); + if (CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) + vty_out(vty, " behavior usid\n"); vty_out(vty, " exit\n"); vty_out(vty, " !\n"); }