소스 검색

Make sure IPv6 is enabled for IP6tables

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
Arko Dasgupta 4 년 전
부모
커밋
b7c663c2ec
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      libnetwork/drivers/bridge/bridge.go

+ 2 - 2
libnetwork/drivers/bridge/bridge.go

@@ -779,13 +779,13 @@ func (d *driver) createNetwork(config *networkConfiguration) (err error) {
 		{d.config.EnableIPTables, network.setupIP4Tables},
 
 		// Setup IP6Tables.
-		{d.config.EnableIP6Tables, network.setupIP6Tables},
+		{config.EnableIPv6 && d.config.EnableIP6Tables, network.setupIP6Tables},
 
 		//We want to track firewalld configuration so that
 		//if it is started/reloaded, the rules can be applied correctly
 		{d.config.EnableIPTables, network.setupFirewalld},
 		// same for IPv6
-		{d.config.EnableIP6Tables, network.setupFirewalld6},
+		{config.EnableIPv6 && d.config.EnableIP6Tables, network.setupFirewalld6},
 
 		// Setup DefaultGatewayIPv4
 		{config.DefaultGatewayIPv4 != nil, setupGatewayIPv4},