VLAN: Avoid access to non-existing interfaces
Currently, hostapd_get_vlan_id_ifname() is used to determine if a given vlan is valid *and* to actually determine the interface. This leads to wpa_set_keys() sometimes setting the key on the wildcard interface name, which does not make sense. This patch therefore adds hostapd_vlan_id_valid() and makes hostapd_get_vlan_id_ifname() not return a wildcard interface. Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
4345fe963e
commit
80ebfd9527
4 changed files with 16 additions and 5 deletions
|
@ -1438,8 +1438,7 @@ ieee802_1x_receive_auth(struct radius_msg *msg, struct radius_msg *req,
|
|||
sta->vlan_id = radius_msg_get_vlanid(msg);
|
||||
}
|
||||
if (sta->vlan_id > 0 &&
|
||||
hostapd_get_vlan_id_ifname(hapd->conf->vlan,
|
||||
sta->vlan_id)) {
|
||||
hostapd_vlan_id_valid(hapd->conf->vlan, sta->vlan_id)) {
|
||||
hostapd_logger(hapd, sta->addr,
|
||||
HOSTAPD_MODULE_RADIUS,
|
||||
HOSTAPD_LEVEL_INFO,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue