Skip to content

fix(hermit): pass the gateway as part of ip= - #1198

Draft
martijnhoekstra wants to merge 2 commits into
urunc-dev:mainfrom
martijnhoekstra:fix/hermit-gateway
Draft

martijnhoekstra wants to merge 2 commits into
urunc-dev:mainfrom
martijnhoekstra:fix/hermit-gateway

Conversation

@martijnhoekstra

@martijnhoekstra martijnhoekstra commented Nov 9, 2026 •

Copy link
Copy Markdown

Description

Hermit reads the gateway as part of ip=<ip>/<prefix>:<gw> (hermit-os/kernel src/env/ip_config.rs). The separate gateway=<gw> that urunc writes now is logged as an unparsable boot argument, and the guest gets no default route.

This changes CommandString to write one ip= argument, and adds hermit_rs_test.go: the address with and without a gateway, with application arguments after --, and with only application arguments.

Compatibility: Hermit main reads this form since hermit-os/kernel f2f05350. No Hermit version has read gateway= so far, so nothing is breaking. The latest released version, v0.13.2, (03-13-2026) doesn't take this format though - it takes -ip, -mask and -gateway. This PR changes nothing for that or any other currently released version.

Related issues

How was this tested?

  • make test_unikernels passes. On the old code, the two cases with a gateway fail.
  • The other unit test targets pass. test_unikontainers passes as a non-root user; as root, TestCopyFile and TestMoveFile fail, on 8355257 too.
  • golangci-lint v2.15, the version CI uses, reports nothing new. make lint uses v2.9, which can't load a go1.27.3 module.
  • The ctr e2e suite (go test ./tests/e2e -run TestE2E --ginkgo.focus=Ctr) with urunc built by make static: 13 of 14 specs pass, including Qemu-hermit-hello-world. Firecracker-unikraft-hello fails with the Unikraft guest's Assertion failure: ml->flags == mr->flags on Firecracker v1.17.0, the same on 8355257. Skipped because the test machine lacks devmapper, virtiofsd and Hyperlight: the two rumprun specs, Qemu-linux-read-file-virtiofs and Hyperlight-unikraft-hello.
  • End to end in the setup from hermit: the guest gets no default route (gateway= is not a Hermit boot argument) #1197: urunc runs -append "ip=10.4.0.3/24:10.4.0.1", the guest logs Gateway: 10.4.0.1, and the routed client (192.168.77.1) gets its echo. The on-link client still does.

LLM usage

Claude Opus 5.5 (claude-opus-5-5) helped write the change, the test and this description, and ran the tests above. I reviewed the change and the results.

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

make lint can't run here: its pinned golangci-lint v2.9 doesn't load a go1.27.3 module (on main too). golangci-lint v2.15, the version CI uses, reports no new issues. I filed #1201 -- it's two-liner fix to the makefile

@netlify

netlify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

👷 Deploy request for urunc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 854ab3b

Signed-off-by: Martijn <martijn.hoekstra@kiteworks.com>
Hermit reads the address and the gateway from one boot argument,
ip=<ip>/<prefix>:<gateway>. It does not parse a separate gateway=<gw>,
so the guest got no default route and could only answer clients on its
own subnet.

Fixes: urunc-dev#1197
Signed-off-by: Martijn <martijn.hoekstra@kiteworks.com>
@cmainas

cmainas commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Hello @martijnhoekstra ,

The PR looks good, let;s mark it ready so we can merge it.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermit: the guest gets no default route (gateway= is not a Hermit boot argument)

2 participants