aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-11-27 12:02:18 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-27 12:02:18 (GMT)
commit527d2378aca7cf0cc9d712f7a1994efec1b3b46f (patch)
tree747460eb1ae88b5bba40ee4c2a33ef02f465ec03 /hostapd/ctrl_iface.c
parent5f7b07de919910ed89f845535fbb591bb22fd126 (diff)
downloadhostap-527d2378aca7cf0cc9d712f7a1994efec1b3b46f.zip
hostap-527d2378aca7cf0cc9d712f7a1994efec1b3b46f.tar.gz
hostap-527d2378aca7cf0cc9d712f7a1994efec1b3b46f.tar.bz2
hostapd: Allow DATA_TEST_CONFIG to configure ifname
This allows the device-based data connectivity tests to be extended for bridge and VLAN interface cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/ctrl_iface.c')
-rw-r--r--hostapd/ctrl_iface.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index fa0e81f..33cb8bc 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1543,6 +1543,8 @@ static int hostapd_ctrl_iface_data_test_config(struct hostapd_data *hapd,
char *cmd)
{
int enabled = atoi(cmd);
+ char *pos;
+ const char *ifname;
if (!enabled) {
if (hapd->l2_test) {
@@ -1557,7 +1559,13 @@ static int hostapd_ctrl_iface_data_test_config(struct hostapd_data *hapd,
if (hapd->l2_test)
return 0;
- hapd->l2_test = l2_packet_init(hapd->conf->iface, hapd->own_addr,
+ pos = os_strstr(cmd, " ifname=");
+ if (pos)
+ ifname = pos + 8;
+ else
+ ifname = hapd->conf->iface;
+
+ hapd->l2_test = l2_packet_init(ifname, hapd->own_addr,
ETHERTYPE_IP, hostapd_data_test_rx,
hapd, 1);
if (hapd->l2_test == NULL)