feat(ipv6): SLAAC, DHCPv6, NAT66 and netboot - #4
Open
phaus wants to merge 7 commits into
Open
Conversation
IPv6 gateway across LAN/VLAN/WiFi scopes: - built-in RA server (mdlayher/ndp): SLAAC + RDNSS, M/O flags - stateful/stateless DHCPv6: IA_NA leases, DUID, lease reaper - RFC 5970 netboot: option 61 client arch -> option 59 bootfile URL, legacy BIOS vs UEFI selection - NAT66 masquerade, IPv6 forwarding, WAN mode6 auto/static/disabled - dual-stack per-client traffic counters (ip6 field in status API) - VLAN address6 overrides + global dns6 in runtime extras
addrconf generates fe80:: asynchronously after a global address is assigned, so ndp.Listen raced it and failed on every interface. Wait up to 2s for the kernel link-local, then install fe80::1.
A tentative link-local address (DAD in progress) cannot be bound, so ndp.Listen failed even after ensureLinkLocal found fe80::. Poll for a non-tentative link-local address before listening.
DAD state could not be read reliably (custom kernel may omit the IFA_FLAGS attribute), so tentative addresses were handed to the NDP listener and bind failed. fe80::1 with IFA_F_NODAD is usable immediately and independent of addrconf timing.
ndp.ParseAddr parses the zone from a zoned literal, then compares against the unzoned interface address, so 'fe80::1%br-vlan1' never matched. Pass the unzoned string; ndp re-adds the zone itself.
iPXE clients already chain-load their boot script via IPv4 DHCP. The option 59 bootfile URL (undionly.kpxe for legacy) pointed at IPv6 TFTP, which the server does not listen on, so iPXE hung on OACK and the Lenovo boot-looped between DHCP and TFTP.
Inherit global dns6 only when scope DNS6 is nil; an explicit empty list advertises no IPv6 DNS (RDNSS + DHCPv6 option 23). Fixes netboot regression: iPXE on br-vlan31 got v6 DNS, resolved AAAA, tried IPv6 HTTP from a ULA address and failed (no NAT66). vlan31 is now SLAAC-only.
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.
IPv6 gateway across LAN/VLAN/WiFi scopes: