[PATCHv2 06/12] wpa_supplicant: parse ifname argument from DATA_TEST_CONFIG
Michael Braun
michael-dev at fami-braun.de
Sun Dec 6 12:47:37 PST 2015
This is required to test tagged vlans.
Signed-off-by: Michael Braun <michael-dev at fami-braun.de>
---
wpa_supplicant/ctrl_iface.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 1f4630f..b9fb482 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -7608,6 +7608,8 @@ static int wpas_ctrl_iface_data_test_config(struct wpa_supplicant *wpa_s,
char *cmd)
{
int enabled = atoi(cmd);
+ char *pos;
+ const char *ifname;
if (!enabled) {
if (wpa_s->l2_test) {
@@ -7621,7 +7623,13 @@ static int wpas_ctrl_iface_data_test_config(struct wpa_supplicant *wpa_s,
if (wpa_s->l2_test)
return 0;
- wpa_s->l2_test = l2_packet_init(wpa_s->ifname, wpa_s->own_addr,
+ pos = os_strstr(cmd, " ifname=");
+ if (pos)
+ ifname = pos + 8;
+ else
+ ifname = wpa_s->ifname;
+
+ wpa_s->l2_test = l2_packet_init(ifname, wpa_s->own_addr,
ETHERTYPE_IP, wpas_data_test_rx,
wpa_s, 1);
if (wpa_s->l2_test == NULL)
--
2.1.4
More information about the Hostap
mailing list