Skip to contentSkip to conversation

BUG: Anonymous maps with adjacent intervals broken since Linux 5.6

DISCUSSION Thorsten Knabe 2 participants 3 messages Apr 10, 2020 – Apr 11, 2020 netfilter

lore
Share & tools
lore
#0 lore raw

Hello.

BUG: Anonymous maps with adjacent intervals are broken starting with

Linux 5.6. Linux 5.5.16 is not affected.

Environment:
- Linux 5.6.3 (AMD64)
- nftables 0.9.4

Trying to apply the ruleset:

flush ruleset

table ip filter {
  chain test {
    ip daddr vmap {
        10.255.1.0-10.255.1.255: accept,
        10.255.2.0-10.255.2.255: drop
    }
  }
}

using nft results in an error on Linux 5.6.3:

# nft -f simple.nft
simple.nft:7:19-5: Error: Could not process rule: File exists
    ip daddr vmap {

The same ruleset works flawlessly using Linux 5.5.16.

Changing the ruleset to:

flush ruleset

table ip filter {
  chain test {
    ip daddr vmap {
        10.255.1.0-10.255.1.254: accept,
        10.255.2.0-10.255.2.255: drop
    }
  }
}

(non adjacent intervals) makes the ruleset work again on Linux 5.6.3.

Reverting commit 7c84d41416d836ef7e533bd4d64ccbdf40c5ac70 from Linux 5.6.3 also fixes the problem.

Kind regards
Thorsten

Signature · 3 lines
___              
 |        | /                 E-Mail: [email protected] 
 |horsten |/\nabe                WWW: http://linux.thorsten-knabe.de 
#1 lore raw

Hi Thorsten,

Quoted 22 lines · On Fri, 10 Apr 2020 19:25:49 +0200 Thorsten Knabe <[email protected]>…

Hello.

BUG: Anonymous maps with adjacent intervals are broken starting with

Linux 5.6. Linux 5.5.16 is not affected.

Environment:
- Linux 5.6.3 (AMD64)
- nftables 0.9.4

Trying to apply the ruleset:

flush ruleset

table ip filter {
  chain test {
    ip daddr vmap {
        10.255.1.0-10.255.1.255: accept,
        10.255.2.0-10.255.2.255: drop
    }
  }
}

Quoted 5 lines

using nft results in an error on Linux 5.6.3:

# nft -f simple.nft
simple.nft:7:19-5: Error: Could not process rule: File exists
    ip daddr vmap {

Thanks for reporting this issue. I can't test it right now, but:

commit 72239f2795fab9a58633bd0399698ff7581534a3

Author: Stefano Brivio <[email protected]>
Date:   Wed Apr 1 17:14:38 2020 +0200

netfilter: nft_set_rbtree: Drop spurious condition for overlap detection on insertion

should be the fix for this. Can you try with that?

Signature · 1 line
Stefano
#2 lore raw

Hello Stefano.

Quoted 35 lines · Stefano Brivio

Hi Thorsten,

Quoted 22 lines · On Fri, 10 Apr 2020 19:25:49 +0200 Thorsten Knabe <[email protected]>…

Hello.

BUG: Anonymous maps with adjacent intervals are broken starting with

Linux 5.6. Linux 5.5.16 is not affected.

Environment:
- Linux 5.6.3 (AMD64)
- nftables 0.9.4

Trying to apply the ruleset:

flush ruleset

table ip filter {
  chain test {
    ip daddr vmap {
        10.255.1.0-10.255.1.255: accept,
        10.255.2.0-10.255.2.255: drop
    }
  }
}

Quoted 5 lines

using nft results in an error on Linux 5.6.3:

# nft -f simple.nft
simple.nft:7:19-5: Error: Could not process rule: File exists
    ip daddr vmap {

Thanks for reporting this issue. I can't test it right now, but:

Quoted 7 lines

commit 72239f2795fab9a58633bd0399698ff7581534a3

Author: Stefano Brivio <[email protected]>
Date:   Wed Apr 1 17:14:38 2020 +0200

netfilter: nft_set_rbtree: Drop spurious condition for overlap detection on insertion

should be the fix for this. Can you try with that?

I tried your patch 72239f2795fab9a58633bd0399698ff7581534a3 and it indeed fixes the problem. Thank you.

Kind regards
Thorsten

Signature · 3 lines
___
 |        | /                 E-Mail: [email protected]
 |horsten |/\nabe                WWW: http://linux.thorsten-knabe.de