Support multiple bind addresses for dual-stack (IPv4 + IPv6)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- ruby, yaml
- Ambito
- infrastructure, networking
Direzione di ricerca
Start by locating the HAProxy job templates and specs that render every use of ha_proxy.binding_ip, including HTTP, HTTPS, WSS, health-check, and TCP bindings. Compare the proposed binding_ips behavior with the existing v4v6 rendering; completion should apply validated addresses across all bind sites and ensure IPv6 entries generate the intended v6only setting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The current ha_proxy.binding_ip property accepts a single scalar address. Combined with ha_proxy.v4v6: true, it enables dual-stack by creating one IPv6 socket that also accepts IPv4 connections via the kernel's IPv4-mapped IPv6 mechanism (::ffff:x.x.x.x).
This has two drawbacks:
-
IPv4-mapped addresses in logs -- All IPv4 client addresses appear as
::ffff:10.x.x.xbecause they arrive through the IPv6 socket. This may affect log parsing, ACL matching, and monitoring tools that expect plain IPv4 addresses. -
No separate socket option -- Some environments my require distinct IPv4 and IPv6 sockets (e.g., for independent firewall rules, clean logging, or compliance). The only workaround today is
ha_proxy.frontend_config, which is fragile because it applies to all frontends, requires manually duplicating TLS/ALPN/mTLS options, and forces disabling the HTTP frontend to avoid port conflicts.
Related bug
ha_proxy.v4v6 uses if_p (presence check) instead of checking the Boolean value. Since the property defaults to false, binding_ip: "::" always renders v4v6 regardless of the property value. On most Linux stemcells this is masked by the kernel default (net.ipv6.bindv6only=0), but it is incorrect behavior.
Options
Option A: Flat address list (implemented on branch)
- Auto-detects IPv4 vs IPv6 via IPAddr and applies v6only on IPv6 entries
- Makes IPv6 addresses explicitly IPv6 only
- Global scope: replaces binding_ip at all generated bind sites (HTTP, HTTPS, WSS, health checks, TCP routing, generic TCP)
- Validates for type, duplicates, and invalid IPs
- Rejects combination with v4v6: true
- Simplest API for the dominant use case (0.0.0.0 + ::)
- No explicit control over v4v6 vs v6only per address
ha_proxy:
binding_ips:
- 0.0.0.0
- "::"
Option B: Per-family lists
- Explicit control: operator chooses v4v6 or v6only per IPv6 address
- More complex API and validation (combinatorial: what if same address in multiple lists? IPv4 in v6only?)
- v4v6 list alongside v4 list creates overlapping socket ownership
- Less ergonomic in BOSH ops files (nested properties)
ha_proxy:
binding_ips:
v4:
- 0.0.0.0
v4v6:
- "::"
v6only:
- "::"
Option C: Flat list + mode flag
- Keeps the simple flat list
- Adds a single property to override the IPv6 socket behavior globally
- Covers the rare case where v4v6 is desired on listed IPv6 addresses
- Minimal additional complexity
ha_proxy:
binding_ips:
- 0.0.0.0
- "::"
binding_ips_v6_mode: v6only # default, or "v4v6"
Recommendation
Option A (flat list) covers ~95% of real-world usage. Option C is a reasonable extension if explicit v4v6 control is ever needed. Option B adds complexity without a clear use case that justifies it.
+++ Additional Remarks +++
When binding_ip is set to :: and the v4v6 flag is not set or false the configuration / acceptance of IPv4 traffic depends on the kernel / stemcell configuration. This makes it non-deterministic whether IPv4 traffic is accepted when binding ::.
Proposal
When binding_ip is set to :: and the v4v6 flag is not set or false only accept IPv6 traffic by setting the v6only flag.
+++ This is can be a breaking change +++
- Lingua principale
- Ruby
- Stelle
- 36
- Fork
- 84
- Merge medio
- 2g 6h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
Bug Ruby
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-ruby#3211 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
internetee/registry#2984 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ecosyste-ms/issues#862 ·
I maintainer di solito rispondono entro 1 giorno
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredForse già presa @mimosa l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
riscv/riscv-unified-db#2829 ·
I maintainer di solito rispondono entro 1 giorno