Netfilter-Devel Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git