fix(docker): disable IPv6 on the gateway network #515
@@ -148,6 +148,13 @@ class DockerGateway(Gateway):
|
||||
)
|
||||
proc = run_docker([
|
||||
"docker", "network", "create",
|
||||
# bot-bottle attribution pins IPv4 source IPs; it has no IPv6
|
||||
# support. Disable IPv6 explicitly so a daemon that default-enables
|
||||
# it (default-address-pools) can't attach an fdd0::/64 subnet — a
|
||||
# malformed `::1/64` gateway address then trips docker's own
|
||||
# ParseAddr in `network inspect`/`ls`, which poisons every launch
|
||||
# that reads this network's subnet.
|
||||
"--ipv6=false",
|
||||
"--subnet", self._subnet,
|
||||
"--label", f"{_GATEWAY_SUBNET_LABEL}={self._subnet}",
|
||||
self.network,
|
||||
|
||||
@@ -215,6 +215,9 @@ class TestDockerGateway(unittest.TestCase):
|
||||
self.assertEqual(
|
||||
[[
|
||||
"docker", "network", "create",
|
||||
# IPv6 is disabled so a default-IPv6 daemon can't attach a
|
||||
# malformed fdd0::/64 subnet that breaks `network inspect`.
|
||||
"--ipv6=false",
|
||||
"--subnet", DEFAULT_GATEWAY_SUBNET,
|
||||
"--label",
|
||||
f"bot-bottle.gateway-subnet={DEFAULT_GATEWAY_SUBNET}",
|
||||
|
||||
Reference in New Issue
Block a user