[libvirt] [PATCH v2 0/5] Prevent losing IPv6 routes due to forwarding

Cedric Bosdonnat cbosdonnat at suse.com
Wed May 10 07:34:47 UTC 2017


On Wed, 2017-05-10 at 13:30 +0800, Yalan Zhang wrote:
> I'm sorry that I missed the mail. 

没关系

> But currently I can not reproduce it. 
> For the error by net-create, it is executed when I set accept_ra to 1.

That sounds more normal. net-create and net-start are triggering the
same code in the end.

> I have just test on libvirt-3.2.0-4.el7.x86_64, the behavior changes, it seems like there is no check for accept_ra
> before start a network with ipv6.
> 
> 1. define and start a network with ipv6 settings
> # virsh net-dumpxml default6
> <network>
>   <name>default6</name>
>   <uuid>c502d02c-fbd0-49d9-91e4-0fcf0ef159d0</uuid>
>   <forward mode='nat'/>
>   <bridge name='virbr4' stp='on' delay='0'/>
>   <mac address='52:54:00:04:d5:3c'/>
>   <ip address='192.168.10.1' netmask='255.255.255.0'>
>     <dhcp>
>       <range start='192.168.10.2' end='192.168.10.254'/>
>     </dhcp>
>   </ip>
>   <ip family='ipv6' address='2001:db8:ca2:2::1' prefix='64'>
>     <dhcp>
>       <range start='2001:db8:ca2:2:1::10' end='2001:db8:ca2:2:1::ff'/>
>     </dhcp>
>   </ip>
> </network>
> 
> # cat /proc/sys/net/ipv6/conf/enp0s25/accept_ra
> 1
> 
> # virsh net-start default6   =====> the network can start as well with accept_ra=1
> Network default6 started
> 
> It seems that the "virNetDevIPGetAcceptRA()" in patch  "network: check accept_ra before enabling ipv6 forwarding"
> with commit 00d28a78 is not executed when I start a network. Please help to check, Thank you.

It won't complain at all if there is no RA route set on the host.
To reproduce, you need to setup a machine acting as an ipv6 router
with radvd on the guest network.

Do you actually have an RA route for the enp0s25 device? You can check
it by running `ip -6 r`. These routes are indicated with 'proto ra'

--
Cedric




More information about the libvir-list mailing list