]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
t_client: add per-instance arguments to fping
authorGert Doering <gert@greenie.muc.de>
Mon, 26 Sep 2022 08:11:58 +0000 (10:11 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 27 Sep 2022 15:06:37 +0000 (17:06 +0200)
In addition to global FPING_EXTRA_ARGS now also evaluate
FPING_ARGGS_<suffix>.

This can be used, for example, for a test instance for "will ToS-tagged
packets be sent properly?" by setting FPING_ARGS_2="-O 0x10".

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20220926081158.40640-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25315.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
tests/t_client.sh.in

index 76ac9b2277e13f08fc57e042ea1cda021f32ad4e..48ba6e68f28487d508ff3b82879062ff63113228 100755 (executable)
@@ -238,8 +238,8 @@ run_ping_tests()
     do
        echo "run IPv$proto ping tests ($want), $bytes byte packets..."
 
-       echo "$cmd -b $bytes -C 20 -p 250 -q $FPING_EXTRA_ARGS $targetlist" >>$LOGDIR/$SUF:fping.out
-       $cmd -b $bytes -C 20 -p 250 -q $FPING_EXTRA_ARGS $targetlist >>$LOGDIR/$SUF:fping.out 2>&1
+       echo "$cmd -b $bytes -C 20 -p 250 -q $fping_args $targetlist" >>$LOGDIR/$SUF:fping.out
+       $cmd -b $bytes -C 20 -p 250 -q $fping_args $targetlist >>$LOGDIR/$SUF:fping.out 2>&1
 
        # while OpenVPN is running, pings must succeed (want='want_ok')
        # before OpenVPN is up, pings must NOT succeed (want='want_fail')
@@ -278,6 +278,7 @@ do
     eval expect_ifconfig6=\"\$EXPECT_IFCONFIG6_$SUF\"
     eval ping4_hosts=\"\$PING4_HOSTS_$SUF\"
     eval ping6_hosts=\"\$PING6_HOSTS_$SUF\"
+    eval fping_args=\"\$FPING_EXTRA_ARGS \$FPING_ARGS_$SUF\"
 
     # If EXCEPT_IFCONFIG* variables for this test are missing, run an --up
     # script to generate them dynamically.