[lxc-users] Race condition in IPv6 network configuration

MegaBrutal megabrutal at gmail.com
Sat Jan 6 01:25:05 UTC 2018


Hi all,

It's very sad that I had to do this, but I wrote a script to check the
IPv6 default route of a container. In case it finds a problem (there
is no default route or it is configured through RA when the interface
configuration is supposed to be static), it resets and reconfigures
the network interface. The script is Debian/Ubuntu specific, as it
checks /etc/network/interfaces to verify whether the inet6 interface
config is static, to determine when it should intervene and when it
should not. Thus the script has no effect on hosts those are supposed
to be configured through RA or DHCP (an RA-configured default route is
not an error in that case). The rationale behind this is that you can
deploy the script to multiple containers (include it in your base
image, for example) and it will only take effect on the ones where it
is necessary, and won't cause trouble on hosts those are configured by
RA on purpose.

Here is some more information on my script:
http://git.megabrutal.com/?p=mgsautils.git;a=commit;h=e4171acc6f48a4fffb60f7d877f00f92af5019d7

View & download it here (click "raw" to download in plaintext):
http://git.megabrutal.com/?p=mgsautils.git;a=blob;f=host/fix-ip6-default-route.sh;h=7eb91f20323964fc2c992d4f4dd5b9c392afdd55;hb=HEAD

Or you can clone my repo with primitive but useful sysadmin scripts
(it doesn't really have much yet):
git clone git://git.megabrutal.com/mgsautils.git

Updated versions of my fix-ip6-default-route.sh script will be
committed to this repository (it there will be any).


Greetings,
MegaBrutal


More information about the lxc-users mailing list