Skip to content

inspect: do not show <nil> as gateway#28711

Open
Luap99 wants to merge 1 commit into
containers:mainfrom
Luap99:gw-nil
Open

inspect: do not show <nil> as gateway#28711
Luap99 wants to merge 1 commit into
containers:mainfrom
Luap99:gw-nil

Conversation

@Luap99
Copy link
Copy Markdown
Member

@Luap99 Luap99 commented May 15, 2026

When a network is created without gateway, i.e. --internal --disable-dns then the gateway will be nil. But converting a nil ip to string produces "" which is not what we want as we like an empty string there to signal that the network has no gateway.

Fixes: #28705

Does this PR introduce a user-facing change?

Fixed an issue where networks without a gateway showed "<nil>" as gateway string instead of an empty string in inspect.

When a network is created without gateway, i.e. --internal --disable-dns
then the gateway will be nil. But converting a nil ip to string produces
"<nil>" which is not what we want as we like an empty string there to
signal that the network has no gateway.

Fixes: containers#28705

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
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.

Combining --internal&--disable-dns creates network without gateway

1 participant