From aec5a2fa7ad29d46494db79d7127e8d810c0f2e1 Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 7 Dec 2017 16:06:01 -0500 Subject: [PATCH 1/2] address: support IPv4/IPv6 dual bind. This is the same as haproxy's v4v6 bind option: https://serverfault.com/questions/747895/bind-to-all-interfaces-for-ipv4-and-ipv6-in-haproxy. Signed-off-by: Harvey Tuch --- api/address.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/address.proto b/api/address.proto index 0b1fba84e..f039e5686 100644 --- a/api/address.proto +++ b/api/address.proto @@ -43,6 +43,12 @@ message SocketAddress { // should be set for resolution other than DNS. If the address is a concrete // IP address, no resolution will occur. string resolver_name = 5; + + // When binding to an IPv6 address above, this enables `IPv4 compatibity + // `_. Binding to :: will allow + // both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 + // space as ::FFFF:. + bool ipv4_compat = 6; } message BindConfig { From 4e668017768f43f21f901d59f9191c533515d47c Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 7 Dec 2017 17:09:51 -0500 Subject: [PATCH 2/2] Format fixes. Signed-off-by: Harvey Tuch --- api/address.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/address.proto b/api/address.proto index 72ce7cbf7..c986f0cf7 100644 --- a/api/address.proto +++ b/api/address.proto @@ -46,9 +46,9 @@ message SocketAddress { string resolver_name = 5; // When binding to an IPv6 address above, this enables `IPv4 compatibity - // `_. Binding to :: will allow - // both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 - // space as ::FFFF:. + // `_. Binding to ``::`` will + // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into + // IPv6 space as ``::FFFF:``. bool ipv4_compat = 6; }