The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3591
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === This is the proposed solution; please let me know if there's an issue with this solution.
From f22affcce77bb35f1f961cb154f5141370cd1815 Mon Sep 17 00:00:00 2001 From: Andrew Deng <adeng1...@gmail.com> Date: Sat, 5 Dec 2020 17:32:56 -0600 Subject: [PATCH] disable ipv6 upon creating a bridge in lxc-net.in and enable it on user specifications Signed-off-by: Andrew Deng <adeng1...@gmail.com> --- config/init/common/lxc-net.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/init/common/lxc-net.in b/config/init/common/lxc-net.in index a7dfa6f199..923b1ccd10 100644 --- a/config/init/common/lxc-net.in +++ b/config/init/common/lxc-net.in @@ -78,6 +78,7 @@ start() { [ ! -d /sys/class/net/${LXC_BRIDGE} ] && ip link add dev ${LXC_BRIDGE} type bridge echo 1 > /proc/sys/net/ipv4/ip_forward echo 0 > /proc/sys/net/ipv6/conf/${LXC_BRIDGE}/accept_dad || true + echo 1 > /proc/sys/net/ipv6/conf/${LXC_BRIDGE}/disable_ipv6 # if we are run from systemd on a system with selinux enabled, # the mkdir will create /run/lxc as init_var_run_t which dnsmasq @@ -93,6 +94,7 @@ start() { LXC_IPV6_ARG="" if [ -n "$LXC_IPV6_ADDR" ] && [ -n "$LXC_IPV6_MASK" ] && [ -n "$LXC_IPV6_NETWORK" ]; then + echo 0 > /proc/sys/net/ipv6/conf/${LXC_BRIDGE}/disable_ipv6 echo 1 > /proc/sys/net/ipv6/conf/all/forwarding echo 0 > /proc/sys/net/ipv6/conf/${LXC_BRIDGE}/autoconf ip -6 addr add dev ${LXC_BRIDGE} ${LXC_IPV6_ADDR}/${LXC_IPV6_MASK}
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel