diff mbox

[04/14] tests: Set MAC address in wpas_ctrl_interface_add2() test

Message ID 1444837400-17309-5-git-send-email-ilan.peer@intel.com
State Accepted
Headers show

Commit Message

Peer, Ilan Oct. 14, 2015, 3:43 p.m. UTC
From: Avraham Stern <avraham.stern@intel.com>

mac80211_hwsim only supports 2 different MAC addresses.
Configurations that use a dedicated P2P device interface already
use these 2 addresses, so adding another interface on the same
PHY results in a duplicated MAC address.

Fix this by changing the MAC address of the added interface to make
sure the new interface has a unique MAC address.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
---
 tests/hwsim/test_wpas_ctrl.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py
index 848f390..78ebfa2 100644
--- a/tests/hwsim/test_wpas_ctrl.py
+++ b/tests/hwsim/test_wpas_ctrl.py
@@ -1469,6 +1469,8 @@  def _test_wpas_ctrl_interface_add2(dev, apdev, ifname):
 
     subprocess.call(['iw', 'dev', dev[0].ifname, 'interface', 'add', ifname,
                      'type', 'station'])
+    subprocess.call(['ip', 'link', 'set', 'dev', ifname, 'address',
+	    	     '02:01:00:00:02:01'])
     dev[0].interface_add(ifname, set_ifname=False, all_params=True)
     wpas = WpaSupplicant(ifname=ifname)
     wpas.connect("open", key_mgmt="NONE", scan_freq="2412")