All of lore.kernel.org
 help / color / mirror / Atom feed
* nft meter add behavior change post translate-to-sets change
@ 2025-01-21 14:00 Florian Westphal
  2025-01-21 21:20 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Westphal @ 2025-01-21 14:00 UTC (permalink / raw)
  To: netfilter-devel

TL;DR: since v1.1 meters work slightly different
and re-add after flush won't work:

cat > repro.sh <<EOF
NFT=src/nft

ip netns add N
ip netns exec N $NFT add table filter
ip netns exec N $NFT add chain filter input '{ type filter hook input priority 0 ; }'
ip netns exec N $NFT add rule ip filter input tcp dport 80 meter http1 { tcp dport . ip saddr limit rate over 200/second } counter drop

ip netns exec N $NFT list meters

# This used to remove the anon set, but not anymore
ip netns exec N $NFT flush chain filter input

# This will now fail:
ip netns exec N $NFT add rule ip filter input tcp dport 80 meter http1 { tcp dport . ip saddr limit rate over 200/second } counter drop

ip netns del N
EOF

This is caused by:
b8f8ddff ("evaluate: translate meter into dynamic set")

Should the last rule in above example work or not?
If it should I will turn the above into a formal test case and will
work on a fix, from a quick glance it should be possible to
handle the collision if the existing set has matching key length.

Thanks,
Florian

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

end of thread, other threads:[~2025-01-28 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21 14:00 nft meter add behavior change post translate-to-sets change Florian Westphal
2025-01-21 21:20 ` Pablo Neira Ayuso
2025-01-21 21:33   ` Florian Westphal
2025-01-22  9:18     ` [PATCH nft] evaluate: allow to re-use existing metered set Florian Westphal
2025-01-28 21:06       ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.