[LTP] [PATCH v2 1/2] tst_net.sh: Detect IPv6 disabled via sysct
Petr Vorel
pvorel@suse.cz
Wed Mar 22 17:35:09 CET 2023
Hi Cyril,
> > > + cmd='sysctl -n net.ipv6.conf.all.disable_ipv6'
> > I'm not sure why we should use sysctl when this the same as doing
> > cat /proc/sys/net/ipv6/conf/all/disable_ipv6
> > Or is there any added value from the sysctl command?
> No, but we already use sysctl in tst_init_iface():
> sysctl -qw net.ipv6.conf.$iface.accept_dad=0 || return $?
> tst_rhost_run -c "sysctl -qw net.ipv6.conf.$iface.accept_dad=0" || return $?
> and we don't check for sysctl (expecting is everywhere). I'd also allow using
> sysctl (and then add a check via tst_require_cmds) or change also these with
> cat for reading and echo ... > for writing. WDYT?
BTW tst_set_sysctl() and it's use would need to be rewritten to get benefit of
getting rid of using sysctl. But I can use cat in this case to not extending
sysctl dependency.
Kind regards,
Petr
> Kind regards,
> Petr
More information about the ltp
mailing list