Support VLAN offload with SAE password based selection
Allow VLAN selection based on SAE password entries when VLAN offloading is used. Signed-off-by: Shiva Sankar Gajula <quic_sgajula@quicinc.com>
This commit is contained in:
parent
d276a5ec0a
commit
ee00bbd297
1 changed files with 20 additions and 16 deletions
|
@ -907,23 +907,27 @@ void sae_accept_sta(struct hostapd_data *hapd, struct sta_info *sta)
|
||||||
" to VLAN ID %d",
|
" to VLAN ID %d",
|
||||||
MAC2STR(sta->addr), sta->sae->tmp->vlan_id);
|
MAC2STR(sta->addr), sta->sae->tmp->vlan_id);
|
||||||
|
|
||||||
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_VLAN_OFFLOAD)) {
|
||||||
vlan_desc.notempty = 1;
|
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
||||||
vlan_desc.untagged = sta->sae->tmp->vlan_id;
|
vlan_desc.notempty = 1;
|
||||||
if (!hostapd_vlan_valid(hapd->conf->vlan, &vlan_desc)) {
|
vlan_desc.untagged = sta->sae->tmp->vlan_id;
|
||||||
wpa_printf(MSG_INFO,
|
if (!hostapd_vlan_valid(hapd->conf->vlan, &vlan_desc)) {
|
||||||
"Invalid VLAN ID %d in sae_password",
|
wpa_printf(MSG_INFO,
|
||||||
sta->sae->tmp->vlan_id);
|
"Invalid VLAN ID %d in sae_password",
|
||||||
return;
|
sta->sae->tmp->vlan_id);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ap_sta_set_vlan(hapd, sta, &vlan_desc) < 0 ||
|
if (ap_sta_set_vlan(hapd, sta, &vlan_desc) < 0 ||
|
||||||
ap_sta_bind_vlan(hapd, sta) < 0) {
|
ap_sta_bind_vlan(hapd, sta) < 0) {
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
"Failed to assign VLAN ID %d from sae_password to "
|
"Failed to assign VLAN ID %d from sae_password to "
|
||||||
MACSTR, sta->sae->tmp->vlan_id,
|
MACSTR, sta->sae->tmp->vlan_id,
|
||||||
MAC2STR(sta->addr));
|
MAC2STR(sta->addr));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sta->vlan_id = sta->sae->tmp->vlan_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_VLAN */
|
#endif /* CONFIG_NO_VLAN */
|
||||||
|
|
Loading…
Reference in a new issue