diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-08-23 12:13:28 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-08-23 19:16:50 +0200 |
commit | f3769d2f5094c11ca59d83fba3f1decad8d00caf (patch) | |
tree | 7f3ce1dcda8222cb8ee261cf0040d1940837cff8 /src/owner.c | |
parent | 70d99ce8bf8bd3dab84ea0a6249812b04ec95b8c (diff) |
evaluate: error out on meter overlap with an existing set/map declaration
One of the problems with meters is that they use the set/map
infrastructure behind the scenes which might be confusing to users.
This patch errors out in case user declares a meter whose name overlaps
with an existing set/map:
meter.nft:15:18-91: Error: File exists; meter ‘syn4-meter’ overlaps an existing set ‘syn4-meter’ in family inet
tcp dport 22 meter syn4-meter { ip saddr . tcp dport timeout 5m limit rate 20/minute } counter accept
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An old 5.10 kernel bails out simply with EEXIST, with this patch a
better hint is provided.
Dynamic sets are preferred over meters these days.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/owner.c')
0 files changed, 0 insertions, 0 deletions