mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
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>
This commit is contained in:
parent
5f7b07de91
commit
527d2378ac
@ -1543,6 +1543,8 @@ static int hostapd_ctrl_iface_data_test_config(struct hostapd_data *hapd,
|
|||||||
char *cmd)
|
char *cmd)
|
||||||
{
|
{
|
||||||
int enabled = atoi(cmd);
|
int enabled = atoi(cmd);
|
||||||
|
char *pos;
|
||||||
|
const char *ifname;
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
if (hapd->l2_test) {
|
if (hapd->l2_test) {
|
||||||
@ -1557,7 +1559,13 @@ static int hostapd_ctrl_iface_data_test_config(struct hostapd_data *hapd,
|
|||||||
if (hapd->l2_test)
|
if (hapd->l2_test)
|
||||||
return 0;
|
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,
|
ETHERTYPE_IP, hostapd_data_test_rx,
|
||||||
hapd, 1);
|
hapd, 1);
|
||||||
if (hapd->l2_test == NULL)
|
if (hapd->l2_test == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user