From 06308f4d37009fb09f79b7206d661449fe0a488a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=B6hmke?= Date: Fri, 11 Dec 2020 11:12:41 +0100 Subject: [PATCH] setup IPv4 and IPv6 iptables chain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Benjamin Böhmke --- libnetwork/drivers/bridge/setup_ip_tables.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libnetwork/drivers/bridge/setup_ip_tables.go b/libnetwork/drivers/bridge/setup_ip_tables.go index c483dda82b..1d20ecbe13 100644 --- a/libnetwork/drivers/bridge/setup_ip_tables.go +++ b/libnetwork/drivers/bridge/setup_ip_tables.go @@ -178,7 +178,11 @@ func (n *bridgeNetwork) setupIPTables(ipVersion iptables.IPVersion, maskedAddr * return iptable.ProgramChain(filterChain, config.BridgeName, hairpinMode, false) }) - n.portMapper.SetIptablesChain(natChain, n.getNetworkBridgeName()) + if ipVersion == iptables.IPv4 { + n.portMapper.SetIptablesChain(natChain, n.getNetworkBridgeName()) + } else { + n.portMapperV6.SetIptablesChain(natChain, n.getNetworkBridgeName()) + } } d.Lock()