• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

containernetworking / plugins / 19199087381
52%
master: 55%

Build:
Build:
LAST BUILD BRANCH: go-version
DEFAULT BRANCH: master
Ran 08 Nov 2025 10:00PM UTC
Jobs 1
Files 69
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Nov 2025 09:50PM UTC coverage: 52.152%. First build
19199087381

Pull #1210

github

champtar
portmap: ensure nftables backend only intercept local traffic

portmap iptables backend uses `-m addrtype --dst-type LOCAL`
and a common chain (CNI-HOSTPORT-DNAT) for both hostPort and hostIP/hostPort.

Before this commit, nftables backend was using 2 separate chains,
`hostip_hostports` and `hostports`. The goal was to avoid using
`fib daddr type local` before we jump to `hostip_hostports`,
but this is a behavior change compared to iptables backend,
and a security issue (hostIP: 1.1.1.1 / hostPort: 53).
Also while switching from input to prerouting hook, we forgot to
add the fib lookup for `hostports`, rendering the nftables backend half broken.

To allow transparent upgrades and avoid running the fib lookup twice,
we use an intermediate chain (`hostports_all`)
```
chain hostports_all {
    jump hostip_hostports
    jump hostports
}
```

Long-term we want to remove `hostip_hostports`,
so all new rules are created in the `hostports` chain.

We can't use implicit chains (`jump { jump hostip_hostports; jump hostports }`)
as it's not supported by knftables.Fake yet.

Fixes 9296c5f80
Fixes 01a94e17c

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
Pull Request #1210: portmap: ensure nftables backend only intercept local traffic

40 of 40 new or added lines in 1 file covered. (100.0%)

4920 of 9434 relevant lines covered (52.15%)

27.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 19199087381.1 08 Nov 2025 10:00PM UTC 69
52.15
GitHub Action Run
Source Files on build 19199087381
  • Tree
  • List 69
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #1210
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc