Repository navigation
feat(api): accept IPv6 in api_allow_from + dual-stack bind (#243) - #246
Merged
Merged
Conversation
VijitSingh97
enabled auto-merge (squash)
July 12, 2026 01:37
VijitSingh97
force-pushed
the
claude/ipv6-api-allow-243
branch
from
July 12, 2026 01:37
a753236 to
33201fb
Compare
On an IPv6-primary LAN the stack (pithead-prod/gouda) resolves to IPv6 only, while the rig APIs bind IPv4 — so enabling the control path (#236) couldn't pin api_allow_from to the stack and fell back to a broad LAN /24. Now: - parse_config accepts an IPv6 address/CIDR (charset+colon+prefix guard, same injection-safety posture as the IPv4 octet check) and sets API_ALLOW_FAMILY=ip|ip6. - install_api_firewall renders vs 74.244.47.217 per family in the dual-family inet table. - api-server.py + control-server.py bind AF_INET6 (dual-stack via IPV6_V6ONLY=0) when the bind address is v6, so :: actually serves. 19 new assertions (IPv4+IPv6 parse + families, malformed/injection rejects, ip6 saddr rendering); IPv6 bind smoke-verified on ::1. Docs updated. 1239 passed / 0 failed, lint + lint-md green. Closes #243 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
VijitSingh97
force-pushed
the
claude/ipv6-api-allow-243
branch
from
July 12, 2026 01:38
33201fb to
5d71174
Compare
VijitSingh97
added a commit
that referenced
this pull request
Jul 13, 2026
On an IPv6-primary LAN the stack (pithead-prod/gouda) resolves to IPv6 only, while the rig APIs bind IPv4 — so enabling the control path (#236) couldn't pin api_allow_from to the stack and fell back to a broad LAN /24. Now: - parse_config accepts an IPv6 address/CIDR (charset+colon+prefix guard, same injection-safety posture as the IPv4 octet check) and sets API_ALLOW_FAMILY=ip|ip6. - install_api_firewall renders vs 74.244.47.217 per family in the dual-family inet table. - api-server.py + control-server.py bind AF_INET6 (dual-stack via IPV6_V6ONLY=0) when the bind address is v6, so :: actually serves. 19 new assertions (IPv4+IPv6 parse + families, malformed/injection rejects, ip6 saddr rendering); IPv6 bind smoke-verified on ::1. Docs updated. 1239 passed / 0 failed, lint + lint-md green. Closes #243 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #243. Surfaced enabling the control path (#236) on the fleet: the stack resolves to IPv6 only while the rig APIs bind IPv4, so
api_allow_from(IPv4-only) couldn't pin the writable path to the stack and fell back to a LAN/24.≥2colons +0–128prefix — the charset is the injection guard, matching the IPv4 octet check) and setsAPI_ALLOW_FAMILY(ip|ip6).ip6 saddrvsip saddrper family (theinet rigforgetable already carries both).AF_INET6dual-stack (IPV6_V6ONLY=0) when the bind is a v6 address, soapi_bind/control_bind = ::actually serves both families.Tests: IPv4+IPv6 parse & family, malformed rejects (bad prefix, non-hex, hostname, and two shell/nft-injection attempts incl.
"fd00::/64 accept; drop"), andip6 saddrrendering — 19 assertions. IPv6 bind smoke-verified on::1. Docs updated. Local gate: 1239 / 0, lint + lint-md green.(No fleet action needed — the rigs stay on the LAN
/24scope; this just makes a tighter v6 pin possible.)