Commit 23a3bfd
committed
netfilter: nf_tables: disallow element removal on anonymous sets
Anonymous sets need to be populated once at creation and then they are
bound to rule since 938154b ("netfilter: nf_tables: reject unbound
anonymous set before commit phase"), otherwise transaction reports
EINVAL.
Userspace does not need to delete elements of anonymous sets that are
not yet bound, reject this with EOPNOTSUPP.
From flush command path, skip anonymous sets, they are expected to be
bound already. Otherwise, EINVAL is hit at the end of this transaction
for unbound sets.
Fixes: 9651851 ("netfilter: add nftables")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent b079155 commit 23a3bfd
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
1449 | | - | |
1450 | | - | |
| 1449 | + | |
1451 | 1450 | | |
1452 | 1451 | | |
1453 | 1452 | | |
| |||
7191 | 7190 | | |
7192 | 7191 | | |
7193 | 7192 | | |
7194 | | - | |
7195 | | - | |
| 7193 | + | |
| 7194 | + | |
| 7195 | + | |
| 7196 | + | |
7196 | 7197 | | |
7197 | 7198 | | |
7198 | 7199 | | |
| |||
0 commit comments