netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] evaluate: un-break rule insert with intervals
@ 2022-09-20 12:57 Florian Westphal
  2022-09-20 13:20 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2022-09-20 12:57 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

'rule inet dscpclassify dscp_match  meta l4proto { udp }  th dport { 3478 }  th sport { 3478-3497, 16384-16387 } goto ct_set_ef'
works with 'nft add', but not 'nft insert', the latter yields: "BUG: unhandled op 4".

Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 src/evaluate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/evaluate.c b/src/evaluate.c
index d9c9ca28a53a..edebd7bcd8ab 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -1520,6 +1520,7 @@ static int interval_set_eval(struct eval_ctx *ctx, struct set *set,
 	switch (ctx->cmd->op) {
 	case CMD_CREATE:
 	case CMD_ADD:
+	case CMD_INSERT:
 		if (set->automerge) {
 			ret = set_automerge(ctx->msgs, ctx->cmd, set, init,
 					    ctx->nft->debug_mask);
-- 
2.35.1


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

* Re: [PATCH nft] evaluate: un-break rule insert with intervals
  2022-09-20 12:57 [PATCH nft] evaluate: un-break rule insert with intervals Florian Westphal
@ 2022-09-20 13:20 ` Pablo Neira Ayuso
  2022-09-20 13:27   ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2022-09-20 13:20 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

On Tue, Sep 20, 2022 at 02:57:26PM +0200, Florian Westphal wrote:
> 'rule inet dscpclassify dscp_match  meta l4proto { udp }  th dport { 3478 }  th sport { 3478-3497, 16384-16387 } goto ct_set_ef'
> works with 'nft add', but not 'nft insert', the latter yields: "BUG: unhandled op 4".

That's my fault, thanks for the fix.

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

P.S: Please add a simple test for this regression.

> Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge")
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  src/evaluate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/evaluate.c b/src/evaluate.c
> index d9c9ca28a53a..edebd7bcd8ab 100644
> --- a/src/evaluate.c
> +++ b/src/evaluate.c
> @@ -1520,6 +1520,7 @@ static int interval_set_eval(struct eval_ctx *ctx, struct set *set,
>  	switch (ctx->cmd->op) {
>  	case CMD_CREATE:
>  	case CMD_ADD:
> +	case CMD_INSERT:
>  		if (set->automerge) {
>  			ret = set_automerge(ctx->msgs, ctx->cmd, set, init,
>  					    ctx->nft->debug_mask);
> -- 
> 2.35.1
> 

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

* Re: [PATCH nft] evaluate: un-break rule insert with intervals
  2022-09-20 13:20 ` Pablo Neira Ayuso
@ 2022-09-20 13:27   ` Florian Westphal
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2022-09-20 13:27 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Florian Westphal, netfilter-devel

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Tue, Sep 20, 2022 at 02:57:26PM +0200, Florian Westphal wrote:
> > 'rule inet dscpclassify dscp_match  meta l4proto { udp }  th dport { 3478 }  th sport { 3478-3497, 16384-16387 } goto ct_set_ef'
> > works with 'nft add', but not 'nft insert', the latter yields: "BUG: unhandled op 4".
> 
> That's my fault, thanks for the fix.
> 
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
> 
> P.S: Please add a simple test for this regression.

Done.

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

end of thread, other threads:[~2022-09-20 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 12:57 [PATCH nft] evaluate: un-break rule insert with intervals Florian Westphal
2022-09-20 13:20 ` Pablo Neira Ayuso
2022-09-20 13:27   ` Florian Westphal

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).