mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
Merge pull request #51542 from robmry/rootless-noipv6
rootless: ignore error when enabling IPv6 forwarding
This commit is contained in:
@@ -228,9 +228,10 @@ else
|
||||
# When running with --firewall-backend=nftables, IP forwarding needs to be enabled
|
||||
# because the daemon won't enable it. IP forwarding is harmless in the rootless
|
||||
# netns, there's only a single external interface and only Docker uses the netns.
|
||||
# So, always enable IPv4 and IPv6 forwarding.
|
||||
# So, always enable IPv4 and IPv6 forwarding. But ignore failure to enable IPv6
|
||||
# forwarding, for hosts with IPv6 disabled.
|
||||
sysctl -w net.ipv4.ip_forward=1
|
||||
sysctl -w net.ipv6.conf.all.forwarding=1
|
||||
sysctl -w net.ipv6.conf.all.forwarding=1 || true
|
||||
|
||||
exec "$dockerd" "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user