summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKaixi Fan <fankaixi.li@bytedance.com>2022-04-30 15:48:42 +0800
committerAlexei Starovoitov <ast@kernel.org>2022-05-10 10:49:03 -0700
commit26101f5ab6bdf30ac25c8e578e0b4873e7849e0c (patch)
tree114aec250c8aeba16f76333621194030a9faadcb /include
parentbd2331b3757f5b2ab4aafc591b55fa2a592abf7c (diff)
downloadlinux-stable-26101f5ab6bdf30ac25c8e578e0b4873e7849e0c.tar.gz
linux-stable-26101f5ab6bdf30ac25c8e578e0b4873e7849e0c.tar.bz2
linux-stable-26101f5ab6bdf30ac25c8e578e0b4873e7849e0c.zip
bpf: Add source ip in "struct bpf_tunnel_key"
Add tunnel source ip field in "struct bpf_tunnel_key". Add related code to set and get tunnel source field. Signed-off-by: Kaixi Fan <fankaixi.li@bytedance.com> Link: https://lore.kernel.org/r/20220430074844.69214-2-fankaixi.li@bytedance.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/bpf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 444fe6f1cf35..95a3d1ff6255 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -5604,6 +5604,10 @@ struct bpf_tunnel_key {
__u8 tunnel_ttl;
__u16 tunnel_ext; /* Padding, future use. */
__u32 tunnel_label;
+ union {
+ __u32 local_ipv4;
+ __u32 local_ipv6[4];
+ };
};
/* user accessible mirror of in-kernel xfrm_state.