From db7879025a486b636cbe039132424e4ea411c251 Mon Sep 17 00:00:00 2001 From: Ioana-Ruxandra Stăncioi Date: Wed, 19 Aug 2020 07:31:31 +0000 Subject: sys/linux: add lwtunnel_encap_seg6 description Uncommented because the kernel fixed the seg6_iptunnel.h uapi header https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=88fab21c691bb1ff164e540735237a385e3afeaf --- sys/linux/socket_netlink_route.txt | 31 ++++++++++++++----------------- sys/linux/socket_netlink_route.txt.const | 4 ++++ 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'sys/linux') diff --git a/sys/linux/socket_netlink_route.txt b/sys/linux/socket_netlink_route.txt index fd2d7eb70..ba10f22a8 100644 --- a/sys/linux/socket_netlink_route.txt +++ b/sys/linux/socket_netlink_route.txt @@ -26,8 +26,7 @@ include include include include -# TODO: uncomment after the kernel fixes the seg6_iptunnel.h uapi header. -#include +include include include include @@ -1051,10 +1050,8 @@ lwtunnel_policy [ LWTUNNEL_IP6_FLAGS nlattr[LWTUNNEL_IP6_FLAGS, flags[lwtunnel_ip_flags, int16be]] LWTUNNEL_IP6_OPTS nlattr[LWTUNNEL_IP6_OPTS, ip_opts_policy] -# TODO: uncomment SEG6_IPTUNNEL_SRH, the related header above and the structs below, -# after the kernel fixes the seg6_iptunnel.h uapi header. -# SEG6_IPTUNNEL_SRH nlattr[SEG6_IPTUNNEL_SRH, tuninfo] -# + SEG6_IPTUNNEL_SRH nlattr[SEG6_IPTUNNEL_SRH, seg6_tuninfo] + LWT_BPF_IN nlnest[LWT_BPF_IN, bpf_prog_policy] LWT_BPF_OUT nlnest[LWT_BPF_OUT, bpf_prog_policy] LWT_BPF_XMIT nlnest[LWT_BPF_XMIT, bpf_prog_policy] @@ -1123,17 +1120,17 @@ ila_attr_ident_type = ILA_ATYPE_IID, ILA_ATYPE_LUID, ILA_ATYPE_USE_FORMAT ila_attr_hook_type = ILA_HOOK_ROUTE_INPUT, ILA_HOOK_ROUTE_OUTPUT -# TODO: uncomment after the kernel fixes the seg6_iptunnel.h uapi header. -#seg6_tuninfo { -# tuninfo seg6_iptunnel_encap -# segments array[ipv6_addr, 0:128] -#} [packed] - -# TODO: uncomment after the kernel fixes the seg6_iptunnel.h uapi header. -#seg6_iptunnel_encap { -# mode flags[seg6_iptun_mode, int8] -# srh ipv6_sr_hdr -#} [packed] +seg6_tuninfo { + tuninfo seg6_iptunnel_encap + segments array[ipv6_addr, 0:128] +} [packed] + +seg6_iptunnel_encap { + mode flags[seg6_iptun_mode, int8] + srh ipv6_sr_hdr +} [packed] + +seg6_iptun_mode = SEG6_IPTUN_MODE_INLINE, SEG6_IPTUN_MODE_ENCAP, SEG6_IPTUN_MODE_L2ENCAP cgw_policy [ CGW_MOD_AND nlattr[CGW_MOD_AND, cgw_frame_mod] diff --git a/sys/linux/socket_netlink_route.txt.const b/sys/linux/socket_netlink_route.txt.const index f09b83bf8..605dd5991 100644 --- a/sys/linux/socket_netlink_route.txt.const +++ b/sys/linux/socket_netlink_route.txt.const @@ -621,6 +621,10 @@ RT_TABLE_DEFAULT = 253 RT_TABLE_LOCAL = 255 RT_TABLE_MAIN = 254 RT_TABLE_UNSPEC = 0 +SEG6_IPTUNNEL_SRH = 1 +SEG6_IPTUN_MODE_ENCAP = 1 +SEG6_IPTUN_MODE_INLINE = 0 +SEG6_IPTUN_MODE_L2ENCAP = 2 SEG6_LOCAL_ACTION = 1 SEG6_LOCAL_ACTION_END = 1 SEG6_LOCAL_ACTION_END_BPF = 15 -- cgit mrf-deployment