0.9.26 — rootless: create_epair (first response-data verb)#184
Merged
Conversation
Twenty-seventh 0.9.x release. Wraps IfconfigOps::createEpair —
kernel auto-assigns next free epair unit number, verb returns
the A/B iface names so client can plumb them downstream.
create_epair — no request fields. Response body:
{"created":true,"a":"epair17a","b":"epair17b"}
First verb whose response carries non-trivial data.
Previously all verbs returned status + confirmation body the
client could ignore. create_epair is different because operator
NEEDS the assigned names for next steps (move B to vnet, attach
A to bridge).
Wire: daemon handler builds JSON via formatCreateEpairSuccess.
Client (run_net.cpp) calls existing PrivOpsWirePure::
extractStringField twice (for a + b). No new JSON parser
needed.
CLI wiring: createEpairPrivopsOrLocal returning std::pair.
Two call sites migrate (lines 239 / 518).
Full host-side iface plumbing via privops now achieved:
createEpair (this) / disableOffload (0.9.23) / setUp (0.9.23) /
setInetAddr (0.9.25) / bridgeAddMember (0.9.24) — all 5 IfconfigOps
ops crate run uses have privops paths. With 0.9.22 createJail
and 0.9.21 removeJail, crate run and crate stop no longer need
root for any privileged step when privops socket detected;
legacy setuid fallback is now optional.
2 new ATF tests + verb_token_roundtrips updated.
Suite: 1299 -> 1301.
Remaining: network_lease per-user (0.9.27), default flip
(0.9.28), setuid removed (1.0.0).
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-seventh 0.9.x release. First response-data verb + last iface verb needed for full host-side plumbing.
Wraps
IfconfigOps::createEpair()— kernel auto-assigns the next free epair unit number, verb returns the A/B iface names so client can plumb them downstream.What lands
New privops verb
create_epair— no request fields. Response body shape:{"created":true,"a":"epair17a","b":"epair17b"}First verb whose response carries non-trivial data. Previously all verbs returned status + confirmation body the client could ignore.
create_epairis different because the operator needs the assigned names for next steps (move B-half into vnet, attach A-half to bridge).Wire protocol
formatCreateEpairSuccess(a, b)produces the JSON.Response.bodyas JSON string, calls existingPrivOpsWirePure::extractStringFieldtwice. No new JSON parser — extractStringField already handles top-level string fields.CLI wiring
createEpairPrivopsOrLocal()returnsstd::pair<std::string, std::string>. Two call sites migrate (lines 239 / 518) — bothauto epairPair = IfconfigOps::createEpair();patterns.🎉 Milestone: full host-side iface plumbing via privops
All 5
IfconfigOps::*operationscrate runuses now have privops paths:Combined with 0.9.22
createJailand 0.9.21removeJail,crate runandcrate stopno longer need root for any privileged step when the privops socket is detected. Legacy setuid fallback is now optional.Trade-offs
create_epairsucceeds on daemon but response is dropped, an orphan epair leaks. Same as directIfconfigOps::createEpair()constraint.Test plan
privops_pure_test(create_epair_no_fields_required)privops_wire_pure_test(format_create_epair_response_extracts) — locks down the response shape AND verifies it round-trips through the client'sextractStringFieldextraction pathverb_token_roundtrips_for_every_verbupdatedSeries state
Remaining:
network_lease.cppper-user paths + RCTL umbrella (uses 0.9.10 sub-CIDR + 0.9.11 loginclass)rootless_per_user: truebecomes default)Files
Same set as 0.9.23-0.9.25 plus tests/unit/privops_wire_pure_test.cpp.
Generated by Claude Code