Skip to content

Commit

Permalink
zebra: Add encap source address to SRv6 config write function
Browse files Browse the repository at this point in the history
When writing the SRv6 config from zebra, we must also include the source
address of outer encapsulating IPv6 header.

Signed-off-by: Carmine Scarpitta <[email protected]>
  • Loading branch information
cscarpitta committed Dec 1, 2023
1 parent 9b36dd0 commit 550c47c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zebra/zebra_srv6_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 550c47c

Please sign in to comment.