From: Edward Cree Date: Thu, 19 Mar 2020 19:37:21 +0000 (+0000) Subject: netfilter: flowtable: populate addr_type mask X-Git-Tag: v5.6~21^2~32^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15ff197237e76c4dab06b7b518afaa4ebb1c43e0;p=thirdparty%2Fkernel%2Flinux.git netfilter: flowtable: populate addr_type mask nf_flow_rule_match() sets control.addr_type in key, so needs to also set the corresponding mask. An exact match is wanted, so mask is all ones. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Edward Cree Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c index 06f00cdc38910..f2c22c682851b 100644 --- a/net/netfilter/nf_flow_table_offload.c +++ b/net/netfilter/nf_flow_table_offload.c @@ -87,6 +87,7 @@ static int nf_flow_rule_match(struct nf_flow_match *match, default: return -EOPNOTSUPP; } + mask->control.addr_type = 0xffff; match->dissector.used_keys |= BIT(key->control.addr_type); mask->basic.n_proto = 0xffff;