aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorIoana-Ruxandra Stăncioi <stancioi@google.com>2020-08-19 07:31:31 +0000
committerMarco Elver <marco.elver@gmail.com>2020-08-19 13:28:33 +0200
commitdb7879025a486b636cbe039132424e4ea411c251 (patch)
tree04b7ac9a24eaed20fb73c171f0f51833b365651a /sys/linux
parenta7d4a4f9e7a065440f414fe49b635540240e4922 (diff)
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
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/socket_netlink_route.txt31
-rw-r--r--sys/linux/socket_netlink_route.txt.const4
2 files changed, 18 insertions, 17 deletions
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 <uapi/linux/can/gw.h>
include <uapi/linux/can/vxcan.h>
include <uapi/linux/mpls_iptunnel.h>
include <uapi/linux/ila.h>
-# TODO: uncomment after the kernel fixes the seg6_iptunnel.h uapi header.
-#include <uapi/linux/seg6_iptunnel.h>
+include <uapi/linux/seg6_iptunnel.h>
include <uapi/linux/seg6_local.h>
include <uapi/linux/rpl_iptunnel.h>
include <net/caif/caif_hsi.h>
@@ -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