Skip to content

Commit 0df0f20

Browse files
Paul Blakeydavem330
authored andcommitted
net/sched: cls_flower: Fix missing addr_type in classify
Since we now use a non zero mask on addr_type, we are matching on its value (IPV4/IPV6). So before this fix, matching on enc_src_ip/enc_dst_ip failed in SW/classify path since its value was zero. This patch sets the proper value of addr_type for encapsulated packets. Fixes: 970bfcd ('net/sched: cls_flower: Use mask for addr_type') Signed-off-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5701659 commit 0df0f20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/sched/cls_flower.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,14 @@ static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
153153

154154
switch (ip_tunnel_info_af(info)) {
155155
case AF_INET:
156+
skb_key.enc_control.addr_type =
157+
FLOW_DISSECTOR_KEY_IPV4_ADDRS;
156158
skb_key.enc_ipv4.src = key->u.ipv4.src;
157159
skb_key.enc_ipv4.dst = key->u.ipv4.dst;
158160
break;
159161
case AF_INET6:
162+
skb_key.enc_control.addr_type =
163+
FLOW_DISSECTOR_KEY_IPV6_ADDRS;
160164
skb_key.enc_ipv6.src = key->u.ipv6.src;
161165
skb_key.enc_ipv6.dst = key->u.ipv6.dst;
162166
break;

0 commit comments

Comments
 (0)