0.9.25 — rootless: set_iface_inet_addr verb#183
Merged
Conversation
Twenty-sixth 0.9.x release. Third atomic iface verb. The host-side IPv4 assignment primitive used by run_net.cpp:: createEpair to configure the host-side epair-A end after the jail-side epair-B is moved into the jail. set_iface_inet_addr — wraps IfconfigOps::setInetAddr(iface, addr, prefixLen). 3-arg shape (ifname + addr + prefix_len). Validator reuses validateIpv4Cidr by reassembling addr + "/" + prefixLen. Same wire-up pattern as 0.9.23/0.9.24: privops_pure / privops_wire_pure / privops_nv_pure / privops_client / privops_handlers all gain one function/case. CLI wiring: lib/run_net.cpp gets setInetAddrPrivopsOrLocal helper; createEpair line 229 now uses it instead of direct IfconfigOps::setInetAddr. 1 new ATF test covering happy path + 3 reject cases (bad iface, bad addr, out-of-range prefix). verb_token_roundtrips updated. Suite: 1298 -> 1299. Remaining: create_epair (0.9.26 — first response-data verb).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Twenty-sixth 0.9.x release. Third atomic iface verb. Host-side IPv4 assignment primitive used by
run_net.cpp::createEpairto configure the host-side epair-A end.What lands
New privops verb
set_iface_inet_addr— wrapsIfconfigOps::setInetAddr(iface, addr, prefixLen). 3-arg shape:ifnamevalidateIfaceName)addr/prefix)prefix_lenValidator reuses
validateIpv4Cidrby reassemblingaddr + "/" + prefixLen— cheaper than duplicating IPv4 octet logic.Wire-up
Same stack as 0.9.23/0.9.24 —
privops_pure,privops_wire_pure,privops_nv_pure,privops_client,privops_handlers. One new function/case in each.CLI wiring
lib/run_net.cpp::createEpairline 229 now callssetInetAddrPrivopsOrLocal(info.ifaceA, info.ipA, 31)instead of directIfconfigOps::setInetAddr. The /31 epair-A side gets its IP via privops when socket is detected.Test plan
set_iface_inet_addr_minimal): happy path + 3 reject cases (bad iface, bad addr, out-of-range prefix)verb_token_roundtrips_for_every_verbupdatedSeries state
CLI call-sites wired:
crate retune(0.9.15)crate stop(0.9.17)crate runZFS attach + detach (0.9.18)crate runnullfs mounts 8 sites (0.9.19)crate runvnet moveToVnet 4 sites (0.9.20)crate runremoveJail teardown (0.9.21)crate runcreateJail (0.9.22)crate runsetUp + disableOffload 5 sites (0.9.23)crate runbridge add + del 2 sites (0.9.24)crate runsetInetAddr (host-side epair-A) → set_iface_inet_addr ← this PRRemaining iface verbs:
create_epair(first response-data verb — returns the epair pair names since kernel auto-assigns them)network_leaseper-user + RCTL umbrellaFiles
Same set as 0.9.23/0.9.24:
privops_pure.{h,cpp},privops_wire_pure.{h,cpp},privops_nv_pure.{h,cpp},privops_client.h,privops_client_pure.cpp,privops_handlers.{h,cpp},run_net.cpp,tests/unit/privops_pure_test.cpp,cli/args.cpp,CHANGELOG.md.Generated by Claude Code