Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: fix static srv6 segment-list sid order #15616

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

pguibert6WIND
Copy link
Member

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")

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@pguibert6WIND pguibert6WIND force-pushed the srv6_seg_list_sid_order branch from aae7b9f to a3536fa Compare March 27, 2024 20:40
@mwinter-osr
Copy link
Member

CI:rerun libyang version may have changed during execution which caused the failure

@pguibert6WIND
Copy link
Member Author

ci:rerun

@pguibert6WIND pguibert6WIND force-pushed the srv6_seg_list_sid_order branch 3 times, most recently from 2cad071 to c4f20bb Compare April 3, 2024 09:39
@pguibert6WIND
Copy link
Member Author

ci:rerun

@pguibert6WIND pguibert6WIND force-pushed the srv6_seg_list_sid_order branch from c4f20bb to 718c465 Compare April 3, 2024 19:29
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 <[email protected]>
@pguibert6WIND pguibert6WIND force-pushed the srv6_seg_list_sid_order branch from 718c465 to 8e82e2d Compare April 8, 2024 13:48
@riw777 riw777 merged commit 13d5987 into FRRouting:master Apr 16, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants