wpa_supplicant: Parse ifname argument from DATA_TEST_CONFIG
This is required to test tagged VLANs. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
8be640b780
commit
ba91e92023
1 changed files with 9 additions and 1 deletions
|
@ -7729,6 +7729,8 @@ static int wpas_ctrl_iface_data_test_config(struct wpa_supplicant *wpa_s,
|
||||||
char *cmd)
|
char *cmd)
|
||||||
{
|
{
|
||||||
int enabled = atoi(cmd);
|
int enabled = atoi(cmd);
|
||||||
|
char *pos;
|
||||||
|
const char *ifname;
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
if (wpa_s->l2_test) {
|
if (wpa_s->l2_test) {
|
||||||
|
@ -7742,7 +7744,13 @@ static int wpas_ctrl_iface_data_test_config(struct wpa_supplicant *wpa_s,
|
||||||
if (wpa_s->l2_test)
|
if (wpa_s->l2_test)
|
||||||
return 0;
|
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,
|
ETHERTYPE_IP, wpas_data_test_rx,
|
||||||
wpa_s, 1);
|
wpa_s, 1);
|
||||||
if (wpa_s->l2_test == NULL)
|
if (wpa_s->l2_test == NULL)
|
||||||
|
|
Loading…
Reference in a new issue