diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-09-05 19:23:54 +0200 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2023-12-14 14:58:35 +0100 |
| commit | 6a0956169b317b707670c6285ece50ee4a95d198 (patch) | |
| tree | 089a58f520b9c1dbdb337b5a37396e2cde0cf36c /zebra/zebra_srv6_vty.c | |
| parent | 0c9b4910356742c272c93cdb741d7c20efea3dfd (diff) | |
zebra: Add encap source address to SRv6 config write function
When writing the SRv6 config from zebra, we must also include the source
address of outer encapsulating IPv6 header.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'zebra/zebra_srv6_vty.c')
| -rw-r--r-- | zebra/zebra_srv6_vty.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c index 417489fbcf..c5b8505992 100644 --- a/zebra/zebra_srv6_vty.c +++ b/zebra/zebra_srv6_vty.c @@ -480,6 +480,11 @@ static int zebra_sr_config(struct vty *vty) if (zebra_srv6_is_enable()) { vty_out(vty, "segment-routing\n"); vty_out(vty, " srv6\n"); + if (!IPV6_ADDR_SAME(&srv6->encap_src_addr, &in6addr_any)) { + vty_out(vty, " encapsulation\n"); + vty_out(vty, " source-address %pI6\n", + &srv6->encap_src_addr); + } vty_out(vty, " locators\n"); for (ALL_LIST_ELEMENTS_RO(srv6->locators, node, locator)) { inet_ntop(AF_INET6, &locator->prefix.prefix, |
