Skip to content

libnetwork: add route type field#802

Merged
mheon merged 2 commits intocontainers:mainfrom
Luap99:route-type
Apr 29, 2026
Merged

libnetwork: add route type field#802
mheon merged 2 commits intocontainers:mainfrom
Luap99:route-type

Conversation

@Luap99
Copy link
Copy Markdown
Member

@Luap99 Luap99 commented Apr 29, 2026

Added in netavark in containers/netavark#1417

Needed for containers/podman#28230

@github-actions github-actions Bot added the common Related to "common" package label Apr 29, 2026
@Luap99
Copy link
Copy Markdown
Member Author

Luap99 commented Apr 29, 2026

cc @ashley-cui @p12tic

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>
@ashley-cui
Copy link
Copy Markdown
Member

LGTM, but still not a networking expert

Copy link
Copy Markdown
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK (looking only at the structure of the PR, not the surrounding code), merge whenever appropriate.

Copy link
Copy Markdown
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Luap99 , @ashley-cui : a LLM points out there is common/libnetwork/internal/util.ValidateRoutes which

  • still requires a non-nil Gateway
  • is dead code after #610

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

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, thanks

@Luap99 Luap99 added the podman 6 breaking changes that should go only into podman 6 only label Apr 29, 2026
@mheon
Copy link
Copy Markdown
Member

mheon commented Apr 29, 2026

LGTM

@mheon mheon merged commit 78bc57e into containers:main Apr 29, 2026
17 checks passed
@Luap99 Luap99 deleted the route-type branch April 29, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package podman 6 breaking changes that should go only into podman 6 only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants