]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
t_net.sh: assign MAC address directly during interface creation
authorAntonio Quartulli <a@unstable.cc>
Tue, 28 Apr 2020 13:17:00 +0000 (15:17 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 7 May 2020 11:32:06 +0000 (13:32 +0200)
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200428131700.9123-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19832.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
tests/t_net.sh

index 8f1bc3614170e18377483c1c3125ac4cb87e7ffc..c67c3df2dbacee40eaf637a1acda43ec28e4a512 100755 (executable)
@@ -33,15 +33,13 @@ LAST_STATE=$((${#GET_STATE[@]} - 1))
 reload_dummy()
 {
     $RUN_SUDO ip link del $IFACE
-    $RUN_SUDO ip link add $IFACE type dummy
+    $RUN_SUDO ip link add $IFACE address 00:11:22:33:44:55 type dummy
     $RUN_SUDO ip link set dev $IFACE state up
 
     if [ $? -ne 0 ]; then
         echo "can't create interface $IFACE"
         exit 1
     fi
-
-    $RUN_SUDO ip link set dev $IFACE address 00:11:22:33:44:55
 }
 
 run_test()