libpod: Don't dereference ctrSpec.Linux if it is nil#28317
libpod: Don't dereference ctrSpec.Linux if it is nil#28317Luap99 merged 1 commit intocontainers:mainfrom
Conversation
This prevents a nil pointer crash when running network=host containers on a FreeBSD host using podman-remote. Fixes: containers#28289 Signed-off-by: Doug Rabson <dfr@rabson.org>
| // configuring with Slirp or CNI. That | ||
| // means it's --net=none | ||
| networkMode = "none" | ||
| if ctrSpec.Linux != nil { |
There was a problem hiding this comment.
how is --network none vs --network host handled on freebsd spec? In general this change would make it that you display host even when created with network none or network ns:/somepath (though I guess this does not work at all)
There was a problem hiding this comment.
Right now, --network=none is broken - it behaves the same as --network=host.
With the FreeBSD OCI runtime extension, it is possible to represent --network=none by creating a private vnet for the jail which is not bridged to any network. I have a work-in-progress which adds support for the new FreeBSD OCI runtime bits but its currently blocked waiting for opencontainers/runtime-tools#801 which adds support in the runtime-tools library.
|
While I share the question about this doing the right thing with |
This prevents a nil pointer crash when running network=host containers on a FreeBSD host using podman-remote.
Fixes: #28289
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?