Skip to content

Commit 03afeb6

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
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 <[email protected]> Tested-by: Davide Caratti <[email protected]> Reviewed-by: Davide Caratti <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4d0aed3 commit 03afeb6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

net/core/flow_dissector.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,15 @@ skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
396396

397397
key = &info->key;
398398

399+
if (test_bit(IP_TUNNEL_CSUM_BIT, key->tun_flags))
400+
ctrl_flags |= FLOW_DIS_F_TUNNEL_CSUM;
401+
if (test_bit(IP_TUNNEL_DONT_FRAGMENT_BIT, key->tun_flags))
402+
ctrl_flags |= FLOW_DIS_F_TUNNEL_DONT_FRAGMENT;
403+
if (test_bit(IP_TUNNEL_OAM_BIT, key->tun_flags))
404+
ctrl_flags |= FLOW_DIS_F_TUNNEL_OAM;
405+
if (test_bit(IP_TUNNEL_CRIT_OPT_BIT, key->tun_flags))
406+
ctrl_flags |= FLOW_DIS_F_TUNNEL_CRIT_OPT;
407+
399408
switch (ip_tunnel_info_af(info)) {
400409
case AF_INET:
401410
skb_flow_dissect_set_enc_control(FLOW_DISSECTOR_KEY_IPV4_ADDRS,

0 commit comments

Comments
 (0)