lo0's IPv6 address overwritten

JAKO Andras jako.andras at eik.bme.hu
Fri Apr 10 09:51:52 PDT 2009


> 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

This works fine here too.

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

It's always the same:

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::/96                             ::1                           UGRS        lo0 =>
default                           fe80::1%em0                   UGS         em0
::1                               ::1                           UHL         lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
2001:738:2001:1000::2             link#5                        UHL         lo0
2001:738:2001:2001::/64           link#3                        UC          em0
2001:738:2001:2001::62            00:1b:21:30:ee:7e             UHL         lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%em0/64                     link#3                        UC          em0
fe80::1%em0                       00:06:52:7c:64:40             UHLW        em0
fe80::21b:21ff:fe30:ee7e%em0      00:1b:21:30:ee:7e             UHL         lo0
fe80::%lo0/64                     fe80::1%lo0                   U           lo0
fe80::1%lo0                       link#4                        UHL         lo0
ff01:3::/32                       link#3                        UC          em0
ff01:4::/32                       ::1                           UC          lo0
ff01:5::/32                       2001:738:2001:1000::2         UC          lo1
ff02::/16                         ::1                           UGRS        lo0
ff02::%em0/32                     link#3                        UC          em0
ff02::%lo0/32                     ::1                           UC          lo0
ff02::%lo1/32                     2001:738:2001:1000::2         UC          lo1

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

That works, and ifconfig doesn't show any change on lo0.

I found that when I start a telnet in the jail to an arbitrary global IPv6 
address, lo0's ::1 changes to the jail's IPv6 address. The routing table 
doesn't change.

Andras


More information about the freebsd-jail mailing list