[LTP] [PATCH 3/5] network/virt: skip setting neighbour table if tunnel doesn't have hwaddr

Petr Vorel pvorel@suse.cz
Mon Oct 26 08:06:41 CET 2020


Hi Alexey,

good idea.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

> diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
> index 80b9bcc90..f62120347 100644
> --- a/testcases/network/virt/virt_lib.sh
> +++ b/testcases/network/virt/virt_lib.sh
> @@ -229,10 +229,13 @@ virt_minimize_timeout()
>  	local mac_loc="$(cat /sys/class/net/ltp_v0/address)"
>  	local mac_rmt="$(tst_rhost_run -c 'cat /sys/class/net/ltp_v0/address')"

> -	ROD_SILENT "ip ne replace $ip_virt_remote lladdr \
> -		    $mac_rmt nud permanent dev ltp_v0"
> -	tst_rhost_run -s -c "ip ne replace $ip_virt_local lladdr \
> -			     $mac_loc nud permanent dev ltp_v0"
> +	if [ "$mac_loc" ]; then
NOTE: I guess it's safe to check only $mac_rmt (and not $mac_rmt)

> +		ROD_SILENT "ip ne replace $ip_virt_remote lladdr \
> +			    $mac_rmt nud permanent dev ltp_v0"
> +		tst_rhost_run -s -c "ip ne replace $ip_virt_local lladdr \
> +				     $mac_loc nud permanent dev ltp_v0"
> +	fi
> +
>  	virt_tcp_syn=$(sysctl -n net.ipv4.tcp_syn_retries)
>  	ROD sysctl -q net.ipv4.tcp_syn_retries=1
>  }

Kind regards,
Petr


More information about the ltp mailing list