[LTP] [PATCH v3 1/3] tst_net.sh: Fix for disabled IPv6

Petr Vorel pvorel@suse.cz
Tue May 10 16:04:50 CEST 2022


Hi Cyril,

> > -       tst_net_detect_ipv6 rhost
> > +       [ "$TST_NET_IPV6_ENABLED" = 1 ] && tst_net_detect_ipv6 rhost

> That solves the case where lhost does not support ipv6 but rhost does,
> but there is still case where lhost does support it but rhost does not,
> to fix that we have to clear TST_NET_IPV6_ENABLED in the
> tst_net_detect_ipv6() as well.

Ah, correct, thanks!

> 	if [ $ret -eq 0 ]; then
> 		TST_NET_IPV6_ENABLED=1
> 	else
> 		TST_NET_IPV6_ENABLED=0
nit: I'd slightly prefer to use TST_NET_IPV6_ENABLED=
> 		tst_res TINFO "IPv6 disabled on $type"
> 	fi

Kind regards,
Petr


More information about the ltp mailing list