]> git.puffer.fish Git - mirror/frr.git/commit
zebra: fix static srv6 segment-list sid order 15616/head
authorDmytro Shytyi <dmytro.shytyi@6wind.com>
Wed, 20 Dec 2023 15:18:32 +0000 (16:18 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 8 Apr 2024 13:45:26 +0000 (15:45 +0200)
commit8e82e2d5edd677aa360470a2ce26565fd1cec055
treef1f3aa38788b122fbfc58662fd343d096d980105
parenta2df7e2a167edecbffc57e3bb20ef53bbe83011a
zebra: fix static srv6 segment-list sid order

When configuring a SID list by vtysh, the segment list
obtained in iproute2 is the exact opposite:
>
>vtysh:
>ipv6 route 2005::/64 eth0 segments 2001:db8:aaaa::7/2002::2/2003::3/2004::4
>
>root@r1:/# ip -6 route
>2005::/64 nhid 6  encap seg6 mode encap segs 4 [ 2004::4 2003::3 2002::2 2001:db8:aaaa::7 ] dev dummy0 proto 196 metric 20 pref medium
>

Fix this by keeping the same vtysh config and swap the
segment's order of the list in the rt_netlink.c
>
>root@r1:/# ip -6 route
>2005::/64 nhid 6  encap seg6 mode encap segs 4 [ 2001:db8:aaaa::7 2002::2 2003::3 2004::4 ] dev dummy0 proto 196 metric 20 pref medium
>

Fixes: f20cf14 ("bgpd,lib,sharpd,zebra: srv6 introduce multiple segs/SIDs in nexthop")
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
zebra/rt_netlink.c