mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
libnet/d/bridge: add a new Hairpin config flag
The bridge driver currently determines if hairpin mode is enabled by checking whether the userland proxy is enabled, and if the binary path is set to a non-empty string. It's used (amongst other things) by the driver to decide whether 6-to-4 portmappings are supported, while it normalizes port bindings. As the userland proxy is going to be handled by the nat portmapper, proxy-related params will be removed from the bridge driver, but the port binding normalization will stay in the bridge driver. So, introduce a new Hairpin config flag, and reimplement the original logic in the daemon, when creating the bridge config. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
@@ -931,8 +931,9 @@ func driverOptions(config *config.Config) nwconfig.Option {
|
||||
"DisableFilterForwardDrop": config.BridgeConfig.DisableFilterForwardDrop,
|
||||
"EnableIPTables": config.BridgeConfig.EnableIPTables,
|
||||
"EnableIP6Tables": config.BridgeConfig.EnableIP6Tables,
|
||||
"EnableUserlandProxy": config.BridgeConfig.EnableUserlandProxy,
|
||||
"UserlandProxyPath": config.BridgeConfig.UserlandProxyPath,
|
||||
"EnableUserlandProxy": config.EnableUserlandProxy,
|
||||
"UserlandProxyPath": config.UserlandProxyPath,
|
||||
"Hairpin": !config.EnableUserlandProxy || config.UserlandProxyPath == "",
|
||||
"AllowDirectRouting": config.BridgeConfig.AllowDirectRouting,
|
||||
"Rootless": config.Rootless,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user