netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] netfilter: nf_flow_table: populate addr_type mask
@ 2020-03-19 19:37 Edward Cree
  2020-03-19 20:22 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Cree @ 2020-03-19 19:37 UTC (permalink / raw)
  To: davem; +Cc: netdev, pablo, netfilter-devel, paulb

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 <ecree@solarflare.com>
---
 net/netfilter/nf_flow_table_offload.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index 06f00cdc3891..f2c22c682851 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;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] netfilter: nf_flow_table: populate addr_type mask
  2020-03-19 19:37 [PATCH net] netfilter: nf_flow_table: populate addr_type mask Edward Cree
@ 2020-03-19 20:22 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2020-03-19 20:22 UTC (permalink / raw)
  To: Edward Cree; +Cc: davem, netdev, netfilter-devel, paulb

On Thu, Mar 19, 2020 at 07:37:21PM +0000, Edward Cree wrote:
> 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.

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-19 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 19:37 [PATCH net] netfilter: nf_flow_table: populate addr_type mask Edward Cree
2020-03-19 20:22 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).