lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210120102947.2887543-1-liuhangbin@gmail.com>
Date:   Wed, 20 Jan 2021 18:29:47 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     netdev@...r.kernel.org
Cc:     Ido Schimmel <idosch@...dia.com>, Jiri Pirko <jiri@...dia.com>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        "David S . Miller" <davem@...emloft.net>,
        Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCH net] selftests/net: set link down before enslave

Set the link down before enslave it to a bond device, to avoid
Error: Device can not be enslaved while up.

Fixes: 6374a5606990 ("selftests: rtnetlink: Test bridge enslavement with different parent IDs")
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
 tools/testing/selftests/net/rtnetlink.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index c9ce3dfa42ee..a26fddc63992 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -1205,6 +1205,8 @@ kci_test_bridge_parent_id()
 	dev20=`ls ${sysfsnet}20/net/`
 
 	ip link add name test-bond0 type bond mode 802.3ad
+	ip link set dev $dev10 down
+	ip link set dev $dev20 down
 	ip link set dev $dev10 master test-bond0
 	ip link set dev $dev20 master test-bond0
 	ip link add name test-br0 type bridge
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ