Explorar o código

Properly cleanup iptables rules inserted in OUTPUT (introduced in 3c6b8bb8882fcd2083d1c489df3cc40062b4896c)

Solomon Hykes %!s(int64=12) %!d(string=hai) anos
pai
achega
301a8afff5
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      network.go

+ 1 - 0
network.go

@@ -111,6 +111,7 @@ type PortMapper struct {
 func (mapper *PortMapper) cleanup() error {
 func (mapper *PortMapper) cleanup() error {
 	// Ignore errors - This could mean the chains were never set up
 	// Ignore errors - This could mean the chains were never set up
 	iptables("-t", "nat", "-D", "PREROUTING", "-j", "DOCKER")
 	iptables("-t", "nat", "-D", "PREROUTING", "-j", "DOCKER")
+	iptables("-t", "nat", "-D", "OUTPUT", "-j", "DOCKER")
 	iptables("-t", "nat", "-F", "DOCKER")
 	iptables("-t", "nat", "-F", "DOCKER")
 	iptables("-t", "nat", "-X", "DOCKER")
 	iptables("-t", "nat", "-X", "DOCKER")
 	mapper.mapping = make(map[int]net.TCPAddr)
 	mapper.mapping = make(map[int]net.TCPAddr)