Re: [LTP] [PATCH 6/9] tst_net.sh: Rename function + add doc

Petr Vorel
2023-02-17T12:28:54Z

Hi Cyril,

...
> Ah, it's more complicated than a single switch, there is actually a
> master swtich, default settings and per interface settings.

> i.e. /proc/sys/net/ipv6/conf/default/disable_ipv6
> /proc/sys/net/ipv6/conf/all/disable_ipv6
> /proc/sys/net/ipv6/conf/${IFACE}/disable_ipv6

> Since the deafult value is I suppose inherited by newly added interfaces
> we have to check if ipv6 is disabled by sysctl in the case of network
> namespaces as well, right? Technically we could probably check the
> default/disable_ipv6 before we attempt to create new interfaces, but I
> guess that we woudl rather want to have the same code both for ssh and
> namespaces.

In the end I decided to add check for net.ipv6.conf.all.disable_ipv6=1 in
tst_init_iface() (calls ip link set ...). This way it should be tested only when
needed. That means we need 2 functions.

I wonder if it still makes sense to check net.ipv6.conf.$iface.disable_ipv6
(IMHO needed for two host based setup with IPv6 non-friendly configuration).
I'd be for this check, but it could be in function which checks cmdline.

Kind regards,
Petr