Skip to content

Conversation

@jorti
Copy link
Contributor

@jorti jorti commented Dec 1, 2025

Rules that log with limits and drop are not working as expected because the limits are also affecting the action, causing the packets over the limit to skip the drop.

Fix this by splitting log (with limit) and drop into separate rules.

For the flood rules that use "limit rate over", create separate chains to log and drop.

Fixes #27990

📦 Package Details

Maintainer: @dibdot
(You can find this by checking the history of the package Makefile.)

Description:
Split nft rules that log and drop into 2 different rules so that the limit option doesn't affect the drop.


🧪 Run Testing Details

  • OpenWrt Version: 24.10.4
  • OpenWrt Target/Subtarget: mediatek/mt7622
  • OpenWrt Device: Linksys E8450 (UBI)

✅ Formalities

  • [ x] I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/banip/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

Rules that log with limits and drop are not working as expected because
the limits are also affecting the action, causing the packets over the
limit to skip the drop.

Fix this by splitting log (with limit) and drop into separate rules.

For the flood rules that use "limit rate over", create separate
chains to log and drop.

Fixes openwrt#27990

Signed-off-by: Juan Orti Alcaine <[email protected]>
@BKPepe BKPepe requested a review from dibdot December 1, 2025 17:39
Only create the flood chains when the respective option is enabled.

Signed-off-by: Juan Orti Alcaine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

banip: logging with limits also limits packet drops

1 participant