Skip to content

Commit 706bf4f

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
flow_dissector: set encapsulation control flags for non-IP
Make sure to set encapsulated control flags also for non-IP packets, such that it's possible to allow matching on e.g. TUNNEL_OAM on a geneve packet carrying a non-IP packet. Suggested-by: Davide Caratti <[email protected]> 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 db5271d commit 706bf4f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

net/core/flow_dissector.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
434434
ipv6->dst = key->u.ipv6.dst;
435435
}
436436
break;
437+
default:
438+
skb_flow_dissect_set_enc_control(0, ctrl_flags, flow_dissector,
439+
target_container);
440+
break;
437441
}
438442

439443
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_KEYID)) {

net/sched/cls_flower.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,8 @@ static void fl_init_dissector(struct flow_dissector *dissector,
21992199
FL_KEY_SET_IF_MASKED(mask, keys, cnt,
22002200
FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS, enc_ipv6);
22012201
if (FL_KEY_IS_MASKED(mask, enc_ipv4) ||
2202-
FL_KEY_IS_MASKED(mask, enc_ipv6))
2202+
FL_KEY_IS_MASKED(mask, enc_ipv6) ||
2203+
FL_KEY_IS_MASKED(mask, enc_control))
22032204
FL_KEY_SET(keys, cnt, FLOW_DISSECTOR_KEY_ENC_CONTROL,
22042205
enc_control);
22052206
FL_KEY_SET_IF_MASKED(mask, keys, cnt,

0 commit comments

Comments
 (0)