Skip to content

configs: Enable NFT_BRIDGE_META and NF_CONNTRACK_BRIDGE as modules - #7753

Merged
pelwell merged 1 commit into
raspberrypi:rpi-6.18.yfrom
lpaolini:bridge-nft-modules
Nov 12, 2026
Merged

pelwell merged 1 commit into
raspberrypi:rpi-6.18.yfrom
lpaolini:bridge-nft-modules

Conversation

@lpaolini

Copy link
Copy Markdown
Contributor

The Pi defconfigs build nf_tables bridge support (CONFIG_NF_TABLES_BRIDGE=m) but not two of its options, so common bridge-family rules fail to load. On a Pi 5 running 6.18.60+rpt-rpi-v8:

Error: Could not process rule: Operation not supported
        iifname "veth*" meta ibrname != @open_bridges counter drop
Error: Could not process rule: Protocol error
        ct state established,related accept
  • meta ibrname / obrname (and ibrvproto, ibrpvid) need CONFIG_NFT_BRIDGE_META.
  • Any ct expression in a bridge table needs CONFIG_NF_CONNTRACK_BRIDGE.

The 6.18.60+rpt-rpi-2712 config lacks both too.

This patch enables both as modules in the five defconfigs that already enable NF_TABLES_BRIDGE: bcm2711, bcm2711_rt and bcm2712 (arm64), and bcm2709 and bcmrpi (arm). Neither module loads unless a bridge-family ruleset uses it. Debian's kernels already build both as modules.

Use case: dfw, a firewall for Docker containers on bridge networks, filters traffic on the bridge ports and needs both modules. With them it runs on the Pi 4 and Pi 5 as it does on Debian.

nf_tables bridge support is already enabled, but two of its options
are not:

- NFT_BRIDGE_META provides the bridge meta keys (meta ibrname,
  obrname, ibrvproto, ibrpvid). Without it, rules using them fail
  with "Operation not supported".
- NF_CONNTRACK_BRIDGE provides connection tracking for the bridge
  family. Without it, any ct expression in a bridge table (ct state,
  ct mark) fails with "Protocol error".

Firewalls that filter traffic on bridge ports, such as between Docker
containers on a bridge network, need both. Debian's kernels already
build both as modules. Enable them as modules in the Pi defconfigs that
build nf_tables bridge support.
@pelwell

pelwell commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

That looks reasonable - it just adds two moderately-sized module to the build (12kB and 14kB uncompressed, 2.5kB and 4kB compressed).

@pelwell
pelwell merged commit c489a36 into raspberrypi:rpi-6.18.y Nov 12, 2026
11 of 12 checks passed
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.

2 participants