[CRIU] [PATCH CRIU 08/14] restore/net/ipv6: net device and def/all configuration
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Mon Apr 4 08:26:42 PDT 2016
On 04/04/2016 06:03 PM, Pavel Emelyanov wrote:
> On 04/04/2016 05:46 PM, Pavel Tikhomirov wrote:
>>
>>
>> On 04/04/2016 05:40 PM, Pavel Emelyanov wrote:
>>> On 04/04/2016 04:58 PM, Pavel Tikhomirov wrote:
>>>>
>>>>
>>>> On 04/04/2016 04:38 PM, Pavel Emelyanov wrote:
>>>>> On 04/04/2016 01:30 PM, Pavel Tikhomirov wrote:
>>>>>>
>>>>>>
>>>>>> On 04/04/2016 01:16 PM, Pavel Emelyanov wrote:
>>>>>>>
>>>>>>>> @@ -163,9 +163,11 @@ static int net_conf_op(char *tgt, int *conf, int n, int op, char *proto,
>>>>>>>> continue;
>>>>>>>> }
>>>>>>>> /*
>>>>>>>> - * If dev conf value is the same as default skip restoring it
>>>>>>>> + * If dev conf value is the same as default skip restoring it,
>>>>>>>> + * mtu may be changed by disable_ipv6 so we can not skip
>>>>>>>> + * it's restore
>>>>>>>> */
>>>>>>>
>>>>>>> No, this means that we should restore mtu after disable_ipv6. And we still can check
>>>>>>> for it to match default value.
>>>>>>
>>>>>> Imagine situation:
>>>>>> 1)restore disable_ipv6 for default
>>>>>> 2)restore mtu for default
>>>>>> 3)create eth0
>>>>>> 4)restore disable_ipv6 for eth0
>>>>>> 5)restore mtu for eth0
>>>>>>
>>>>>> After step 3 both default and eth0 mtu are set to default value. But
>>>>>> after step 4 eth0's one can possibly change. So do you mean we need to
>>>>>> first restore both default/disable_ipv6 and eth0/disable_ipv6 and only
>>>>>> after that restore default/mtu ?
>>>>>
>>>>> No. By step 5 will eth0's mtu match the default mtu?
>>>>
>>>> By step 5 we will have eth0/mtu(in image) equal to default/mtu(in image)
>>>> equal to default/mtu(sysctl) but not equal to eth0/mtu(sysctl).
>>>
>>> How can this happen? Anything in the image should match the same in sysctl-s
>>> on the dump side, so if eth0.mtu == default.mtu in image, then the same is
>>> true for sysctls on dump side. Why should it differ on restore?
>>
>> From comment to 06/14 patch:
>>
>> >In addrconf_sysctl_disable->addrconf_disable_ipv6->dev_disable_change:
>> >On addrconf_notify + NETDEV_UP if idev->cnf.mtu6 differs from dev->mtu,
>> >sysctl mtu6 is overwritten.
>> >
>> >So changing disable_ipv6 sysctl for some device may change mtu sysctl
>> >for it...
>>
>> eth0.mtu sysctl changed on step 4.
>
> Argh... Let's come with examples. Would you show the combination of eth0/default
> mtu/disable_ipv6 -s _in_ _images_ that would be restored wrongly if we don't
> make the check you suggest?
First on enabling ipv6 mtu is changed:
[root at dhcp-10-30-28-101 ~]# echo 1280 > /proc/sys/net/ipv6/conf/veth0/mtu
[root at dhcp-10-30-28-101 ~]# cat /proc/sys/net/ipv6/conf/veth0/mtu
1280
[root at dhcp-10-30-28-101 ~]# echo 1 >
/proc/sys/net/ipv6/conf/veth0/disable_ipv6
[root at dhcp-10-30-28-101 ~]# cat /proc/sys/net/ipv6/conf/veth0/mtu
1280
[root at dhcp-10-30-28-101 ~]# echo 0 >
/proc/sys/net/ipv6/conf/veth0/disable_ipv6
[root at dhcp-10-30-28-101 ~]# cat /proc/sys/net/ipv6/conf/veth0/mtu
1500
Second on device creation mtu is changed:
[root at dhcp-10-30-28-101 ~]# echo 1280 > /proc/sys/net/ipv6/conf/default/mtu
[root at dhcp-10-30-28-101 ~]# cat /proc/sys/net/ipv6/conf/default/mtu
1280
[root at dhcp-10-30-28-101 ~]# ip link add veth0 type veth peer name peer0
[root at dhcp-10-30-28-101 ~]# cat /proc/sys/net/ipv6/conf/veth0/mtu
1500
>
> -- Pavel
>
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
More information about the CRIU
mailing list