diff options
author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-12-05 09:08:23 +0100 |
---|---|---|
committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-12-05 10:22:06 +0100 |
commit | dd8b193e8d6b3a85863056cc32a6f57f4b213f39 (patch) | |
tree | 0a626a53a39407ac9b2edd0f5095b77aaf1ccef7 | |
parent | Merge pull request #12429 from opensourcerouting/fix/bgp_nits (diff) | |
download | frr-dd8b193e8d6b3a85863056cc32a6f57f4b213f39.tar.xz frr-dd8b193e8d6b3a85863056cc32a6f57f4b213f39.zip |
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 <carmine.scarpitta@uniroma2.it>
-rw-r--r-- | zebra/zebra_srv6_vty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c index 13ad9d71b..b4fd5f018 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"); } |