QM: Set EUI-64 IPv6 address on station interface
Make sure the link local IPv6 address is set on the station interface
for the QM program.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
diff --git a/sta.c b/sta.c
index 4b0d4c4..f256785 100644
--- a/sta.c
+++ b/sta.c
@@ -3447,6 +3447,7 @@
const char *bssid = get_param(cmd, "bssid");
const char *chan = get_param(cmd, "channel");
const char *network_mode = get_param(cmd, "network_mode");
+ const char *ifname = get_station_ifname(dut);
int wps = 0;
char buf[1000], extra[50];
int e;
@@ -3541,8 +3542,9 @@
return 0;
}
- if (dut->program == PROGRAM_WPA3 &&
- dut->sta_associate_wait_connect) {
+ if ((dut->program == PROGRAM_WPA3 &&
+ dut->sta_associate_wait_connect) ||
+ dut->program == PROGRAM_QM) {
ctrl = open_wpa_mon(get_station_ifname(dut));
if (!ctrl)
return ERROR_SEND_STATUS;
@@ -3659,6 +3661,28 @@
dut->sta_tod_policy, tod);
dut->sta_tod_policy = tod;
}
+ if (dut->program == PROGRAM_QM) {
+ unsigned char iface_mac_addr[ETH_ALEN];
+ char ipv6[100];
+
+ if (get_hwaddr(ifname, iface_mac_addr) < 0) {
+ sigma_dut_print(dut, DUT_MSG_ERROR,
+ "%s: get_hwaddr %s failed",
+ __func__, ifname);
+ ret = ERROR_SEND_STATUS;
+ break;
+ }
+
+ convert_mac_addr_to_ipv6_lladdr(iface_mac_addr,
+ ipv6,
+ sizeof(ipv6));
+
+ if (set_ipv6_addr(dut, ipv6, "64", ifname) !=
+ 0) {
+ ret = ERROR_SEND_STATUS;
+ break;
+ }
+ }
break;
}
}