diff options
author | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2024-07-13 02:19:04 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-15 09:14:38 -0700 |
commit | 03afeb613bfe6b0c28e8b843959f716a3d2c42df (patch) | |
tree | 43d604a6d54ac0a73bb257a1d14f6627c63fb718 /net/core | |
parent | 4d0aed380f9ddf24dfb1d06a05096b778442c403 (diff) | |
download | linux-stable-03afeb613bfe6b0c28e8b843959f716a3d2c42df.tar.gz linux-stable-03afeb613bfe6b0c28e8b843959f716a3d2c42df.tar.bz2 linux-stable-03afeb613bfe6b0c28e8b843959f716a3d2c42df.zip |
flow_dissector: set encapsulated control flags from tun_flags
Set the new FLOW_DIS_F_TUNNEL_* encapsulated control flags, based
on if their counter-part is set in tun_flags.
These flags are not userspace visible yet, as the code to dump
encapsulated control flags will first be added, and later activated
in the following patches.
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Tested-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Davide Caratti <dcaratti@redhat.com>
Link: https://patch.msgid.link/20240713021911.1631517-8-ast@fiberby.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/flow_dissector.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 1614c6708ea7..a0263a4c5489 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -396,6 +396,15 @@ skb_flow_dissect_tunnel_info(const struct sk_buff *skb, key = &info->key; + if (test_bit(IP_TUNNEL_CSUM_BIT, key->tun_flags)) + ctrl_flags |= FLOW_DIS_F_TUNNEL_CSUM; + if (test_bit(IP_TUNNEL_DONT_FRAGMENT_BIT, key->tun_flags)) + ctrl_flags |= FLOW_DIS_F_TUNNEL_DONT_FRAGMENT; + if (test_bit(IP_TUNNEL_OAM_BIT, key->tun_flags)) + ctrl_flags |= FLOW_DIS_F_TUNNEL_OAM; + if (test_bit(IP_TUNNEL_CRIT_OPT_BIT, key->tun_flags)) + ctrl_flags |= FLOW_DIS_F_TUNNEL_CRIT_OPT; + switch (ip_tunnel_info_af(info)) { case AF_INET: skb_flow_dissect_set_enc_control(FLOW_DISSECTOR_KEY_IPV4_ADDRS, |