Subject: Re: [vserver] source IP messed up on multihomed guest with 2.6.38.6-vs2.3.0.37-rc15
From: Thomas Weber <l_vserver@mail2news.4t2.com>
Date: Fri, 27 May 2011 00:15:28 +0200

Hmm nobody cares?

now I can trigger this bug with one interface only.

on the host - no vserver running

# ip addr ls br1
4: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 00:25:90:32:bb:9b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.54/24 brd 192.168.1.255 scope global br1

# cat interfaces/02/*
192.168.105.255
br1
192.168.105.20
24

# cat interfaces/03/*
192.168.1.255
br1
192.168.1.68
24

with vserver running:
# ip addr ls br1
4: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 00:25:90:32:bb:9b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.54/24 brd 192.168.1.255 scope global br1
    inet 192.168.105.20/24 brd 192.168.105.255 scope global br1
    inet 192.168.1.68/24 brd 192.168.1.255 scope global secondary br1

The guest uses 192.168.105.20 as source for outgoing traffic to
192.168.1.0/24.

Now, if i reorder the interfaces like 
mv interfaces/03 interfaces/01 
so that the 192.168.1.68/24 interface comes first, it uses the right IP
for outgoing traffic. Also for the 192.168.105.0/24 network it uses
the .105.20 address.

Note though that this is the only (and not a secondary) address for the
192.168.105.0/24 Network on the system!

I also did some testing without the bridge on eth1 directly with the
same results - so I wouldn't blame the bridge.

This works at least until 2.6.37.6-vs2.3.0.37-rc5,
2.6.38.5-vs2.3.0.37-rc15 is the first 2.6.38 kernel that fails for me
(2.6.38-rc5-vs2.3.0.37-rc4 would not boot for me).

upgrading util-vserver to 0.30.216-pre2967 did not help.

  Tom


Am Freitag, den 20.05.2011, 02:03 +0200 schrieb Thomas Weber:
> My config:
> debian 6.0.1 64bit
> 
> util-vserver: 0.30.216-pre2938
> 
> Host with 2 interfaces:
> eth0
>         address         192.168.105.1
>         netmask         255.255.255.0
>         broadcast       192.168.105.255
>         network         192.168.105.0
>         gateway         192.168.105.254
> 
> eth1
>         address         192.168.1.54
>         netmask         255.255.255.0
>         network         192.168.1.0
>         broadcast       192.168.1.255
>         gateway         192.168.1.254
> 
> a guest with interfaces in both Networks (bcast,dev,ip,prefix)
> 
> # cat interfaces/00/*
> 192.168.105.255
> eth0
> 192.168.105.21
> 24
> 
> # cat interfaces/99/*
> 192.168.1.255
> eth1
> 192.168.1.64
> 24
> 
> 
> Kernels are plain kernel.org + vserver patch
> 
> with 2.6.37.3-vs2.3.0.37-rc3.2
> I can connect hosts on 192.168.1.0/24 just fine (from inside the guest)
> 
> with 2.6.38.6-vs2.3.0.37-rc15
> this doesn't work anymore.
> 
> for ping tcpdump on the host shows me:
> 01:50:26.971098 IP 192.168.105.21 > 192.168.1.8: ICMP echo request, id 3185, seq 1,
length 64
> 01:50:27.976957 IP 192.168.105.21 > 192.168.1.8: ICMP echo request, id 3185, seq 2,
length 64
> 
> so it obiously takes the wrong source address (same with tcp or udp).
> 
> explicitly specifying 192.168.1.64 as source for ping/nc works.
> 
> 
> do i miss something or is this a bug?
> 
>   Tom
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>