Fix default route disappearing in Debian-based containers
Let's take a Debian 6 CT with a network setup similar to this:
cat /etc/network/interfaces
# Auto generated lo interface
auto lo
iface lo inet loopback
# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
up ifconfig venet0 up
up ifconfig venet0 0
up route add default dev venet0
down route del default dev venet0
down ifconfig venet0 down
iface venet0 inet6 manual
auto venet0:0
iface venet0:0 inet static
address 10.30.1.102
netmask 255.255.255.0
The thing is, when venet0 is going up, default route is added:
default dev venet0 scope link
But then venet0:0 is brought up, default route is replaced by a net route:
10.30.1.0/24 dev venet0 proto kernel scope link src 10.30.1.102
Apparently it happens in the kernel, and the workaround is assign a 'local'
(i.e. 'scope host') address to venet0. This is exactly what the patch does.
Should fix bug #1971
http://bugzilla.openvz.org/show_bug.cgi?id=1971
Reported-by: Dietmar Maurer <dietmar@maurer-it.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed