[PATCH v5 08/22] VLAN: Use new VLAN data type in src_ap_pmksa_cache_auth
Michael Braun
michael-dev
Tue Nov 19 11:47:20 PST 2013
Signed-hostap: Michael Braun <michael-dev at fami-braun.de>
---
src/ap/pmksa_cache_auth.c | 9 ++++++---
src/ap/pmksa_cache_auth.h | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/ap/pmksa_cache_auth.c b/src/ap/pmksa_cache_auth.c
index 40972e9..0bac0de 100644
--- a/src/ap/pmksa_cache_auth.c
+++ b/src/ap/pmksa_cache_auth.c
@@ -44,6 +44,7 @@ static void _pmksa_cache_free_entry(struct rsn_pmksa_cache_entry *entry)
#ifndef CONFIG_NO_RADIUS
radius_free_class(&entry->radius_class);
#endif /* CONFIG_NO_RADIUS */
+ vlan_free(&entry->vlan_id);
os_free(entry);
}
@@ -143,7 +144,8 @@ static void pmksa_cache_from_eapol_data(struct rsn_pmksa_cache_entry *entry,
#endif /* CONFIG_NO_RADIUS */
entry->eap_type_authsrv = eapol->eap_type_authsrv;
- entry->vlan_id = ((struct sta_info *) eapol->sta)->vlan_id;
+ vlan_alloc_copy(&entry->vlan_id,
+ &((struct sta_info *) eapol->sta)->vlan_id);
}
@@ -180,7 +182,8 @@ void pmksa_cache_to_eapol_data(struct rsn_pmksa_cache_entry *entry,
}
eapol->eap_type_authsrv = entry->eap_type_authsrv;
- ((struct sta_info *) eapol->sta)->vlan_id = entry->vlan_id;
+ vlan_alloc_copy(&((struct sta_info *) eapol->sta)->vlan_id,
+ &entry->vlan_id);
}
@@ -314,7 +317,7 @@ pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa,
radius_copy_class(&entry->radius_class, &old_entry->radius_class);
#endif /* CONFIG_NO_RADIUS */
entry->eap_type_authsrv = old_entry->eap_type_authsrv;
- entry->vlan_id = old_entry->vlan_id;
+ vlan_alloc_copy(&entry->vlan_id, &old_entry->vlan_id);
entry->opportunistic = 1;
pmksa_cache_link_entry(pmksa, entry);
diff --git a/src/ap/pmksa_cache_auth.h b/src/ap/pmksa_cache_auth.h
index aa90024..1302611 100644
--- a/src/ap/pmksa_cache_auth.h
+++ b/src/ap/pmksa_cache_auth.h
@@ -28,7 +28,7 @@ struct rsn_pmksa_cache_entry {
struct wpabuf *cui;
struct radius_class_data radius_class;
u8 eap_type_authsrv;
- int vlan_id;
+ struct vlan_description vlan_id;
int opportunistic;
};
More information about the Hostap
mailing list