Skip to content

Commit

Permalink
lds,BindConfig: Add "freebind" options to support IP_FREEBIND. (#536)
Browse files Browse the repository at this point in the history
Add an option "freebind" in LDS for listeners and the BindConfig which
is used for outgoing upstream connections. If true, set IP_FREEBIND
socket option. Defaults to false.

PR description will be updated with Envoy implementation PR# once it is
created.

Signed-off-by: Dan Noé <[email protected]>
  • Loading branch information
dnoe authored and htuch committed Mar 13, 2018
1 parent 0be1aa4 commit 5192a08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions envoy/api/v2/core/address.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ message BindConfig {
// The address to bind to when creating a socket.
SocketAddress source_address = 1
[(validate.rules).message.required = true, (gogoproto.nullable) = false];

// [#not-implemented-hide:] Whether to set the IP_FREEBIND option when creating the socket. If
// set, allows the source_address specified to be an address that is not configured on the system
// running Envoy. Defaults to false.
bool freebind = 2;
}

// Addresses specify either a logical or physical address and port, which are
Expand Down
5 changes: 5 additions & 0 deletions envoy/api/v2/lds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,9 @@ message Listener {
// case the original source and destination addresses and ports are preserved on accepted
// connections. Requires Envoy to run with the *CAP_NET_ADMIN* capability. Defaults to false.
bool transparent = 10;

// [#not-implemented-hide:] Whether the listener should set the IP_FREEBIND socket option. When
// this flag is set to true listeners can be bound to an IP address that is not configured on the
// system running Envoy. Defaults to false.
bool freebind = 11;
}

0 comments on commit 5192a08

Please sign in to comment.