Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2009 14:00:48 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        JAKO Andras <jako.andras@eik.bme.hu>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: lo0's IPv6 address overwritten
Message-ID:  <20090410135647.E15361@maildrop.int.zabbadoz.net>
In-Reply-To: <Pine.GSO.4.64.0904101149270.12199@mono>
References:  <Pine.GSO.4.64.0904101149270.12199@mono>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 10 Apr 2009, JAKO Andras wrote:

> Hi,
>
> Starting a jail with one IPv4 and one IPv6 address on a few days old
> RELENG_7 overwrites lo0's ::1 with the jail's IPv6 address. (The jail's
> addresses are preconfigured on lo1.)
>
> Is this expected behaviour? Or did I made something the wrong way?
>
> Here's ifconfig(8)'s output before and after executing jail(8), and also
> from inside of the jail.

testing this on a bit older HEAD:

ifconfig lo1 create inet6 2001:738:2001:1000::2/128
ifconfig lo0 ; ifconfig lo1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet 127.0.0.1 netmask 0xff000000
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet6 2001:738:2001:1000::2 prefixlen 128 
jail -l -U root -i / hostname "2001:738:2001:1000::2" /bin/sh
1
# sysctl security.jail.jailed
security.jail.jailed: 1
# ifconfig lo0; ifconfig lo1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet6 2001:738:2001:1000::2 prefixlen 128

[ another xterm ]

bz@:~> sysctl security.jail.jailed
security.jail.jailed: 0
bz@:~> ifconfig lo0 ; ifconfig lo1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet 127.0.0.1 netmask 0xff000000
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=3<RXCSUM,TXCSUM>
         inet6 2001:738:2001:1000::2 prefixlen 128 
..
ifconfig lo1 destroy


I wonder what's going onfor you.  Can you check with
 	netstat -rn -f inet6
that what you are seeing is indeed true?

Can you try starting the jail to get an interactive shell and not
running any scripts like I did and check what happens then?

/bz

-- 
Bjoern A. Zeeb                      The greatest risk is not taking one.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090410135647.E15361>