Skip to content

RFC: podman: Add support for blackhole routes#28230

Draft
p12tic wants to merge 1 commit intocontainers:mainfrom
p12tic:blackhole-routes
Draft

RFC: podman: Add support for blackhole routes#28230
p12tic wants to merge 1 commit intocontainers:mainfrom
p12tic:blackhole-routes

Conversation

@p12tic
Copy link
Copy Markdown
Contributor

@p12tic p12tic commented Mar 10, 2026

Add support for blackhole, unreachable, and prohibit route types in podman networks. These route types allow silently discarding packets (blackhole), rejecting with destination unreachable (unreachable), or rejecting with administratively prohibited (prohibit).

Blackhole routes require netavark >= 2.0.0. Regular unicast routes remain backward compatible with all netavark versions.

Likely fixes #20222

Exposes this netavark feature: containers/netavark#1417

Currently market as draft to get early feedback before I move libnetwork changes to common repository.

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Add support for blackhole, unreachable, and prohibit route types in podman networks. Supported since netavark 2.0.

Add support for blackhole, unreachable, and prohibit route types in podman
networks. These route types allow silently discarding packets (blackhole),
rejecting with destination unreachable (unreachable), or rejecting with
administratively prohibited (prohibit).

Note: Blackhole routes require netavark >= 2.0.0. Regular unicast routes
remain backward compatible with all netavark versions.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
@github-actions
Copy link
Copy Markdown

A friendly reminder that this PR had no activity for 30 days.

@p12tic
Copy link
Copy Markdown
Contributor Author

p12tic commented Apr 19, 2026

@github-actions Waiting for containers/netavark#1417 to land

@Luap99 Luap99 added 6.0 Breaking changes for Podman 6.0 and removed stale-pr labels Apr 21, 2026
@Luap99
Copy link
Copy Markdown
Member

Luap99 commented Apr 21, 2026

blocked on new CI images (#28520)
I Added the 6.0 label so we do not loose track of this

@Luap99
Copy link
Copy Markdown
Member

Luap99 commented Apr 27, 2026

@p12tic You cannot modify vendor/ files directly uou will need to post the chnage for the type as PR on container-libs first, can you do that?

@Luap99
Copy link
Copy Markdown
Member

Luap99 commented Apr 29, 2026

opened a PR in common to add the type there so we can move some bits forward, we getting close to the 6.0 deadline containers/container-libs#802

Luap99 added a commit to Luap99/container-libs that referenced this pull request Apr 29, 2026
Added in netavark in containers/netavark#1417

Needed for containers/podman#28230

The invalid gw test was somewhat broken, as the go type uses net.IP the
parsing of the ip failed in the test and the ip was just left nil. This
means the json marshal just sends an empty string to netavark and well
that failed parsing in NV then. However now with the route type the
gateway is optional an omitempty and therefore no longer is send to NV.
Instead NV will no fail with a different error about the missing gateway
for unicast routes.

But because the other test checks that once already I rather remove
the checks here as they do not really add value to do this for each
network driver.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99
Copy link
Copy Markdown
Member

Luap99 commented Apr 29, 2026

once #28612 merges you should be able to rebase and use the new type from container libs.

Let me know if you can handle that until early/mid next week, otherwise I will try to finish this here.

@mheon
Copy link
Copy Markdown
Member

mheon commented May 4, 2026

#28612 is merged

@p12tic
Copy link
Copy Markdown
Contributor Author

p12tic commented May 5, 2026

Sorry I was away for some time. I will update the PR this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.0 Breaking changes for Podman 6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request - Podman Networks as a DMZ

3 participants