mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Move wpa_drivers dependency into config_file.c
This cleans up config.o from driver wrapper dependencies.
This commit is contained in:
parent
a3d4fafa41
commit
d3b86aed73
@ -26,9 +26,6 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
extern struct wpa_driver_ops *wpa_drivers[];
|
|
||||||
|
|
||||||
|
|
||||||
static void hostapd_config_free_vlan(struct hostapd_bss_config *bss)
|
static void hostapd_config_free_vlan(struct hostapd_bss_config *bss)
|
||||||
{
|
{
|
||||||
struct hostapd_vlan *vlan, *prev;
|
struct hostapd_vlan *vlan, *prev;
|
||||||
@ -115,15 +112,6 @@ struct hostapd_config * hostapd_config_defaults(void)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set default driver based on configuration */
|
|
||||||
conf->driver = wpa_drivers[0];
|
|
||||||
if (conf->driver == NULL) {
|
|
||||||
wpa_printf(MSG_ERROR, "No driver wrappers registered!");
|
|
||||||
os_free(conf);
|
|
||||||
os_free(bss);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bss->radius = os_zalloc(sizeof(*bss->radius));
|
bss->radius = os_zalloc(sizeof(*bss->radius));
|
||||||
if (bss->radius == NULL) {
|
if (bss->radius == NULL) {
|
||||||
os_free(conf);
|
os_free(conf);
|
||||||
|
@ -1148,6 +1148,15 @@ struct hostapd_config * hostapd_config_read(const char *fname)
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set default driver based on configuration */
|
||||||
|
conf->driver = wpa_drivers[0];
|
||||||
|
if (conf->driver == NULL) {
|
||||||
|
wpa_printf(MSG_ERROR, "No driver wrappers registered!");
|
||||||
|
hostapd_config_free(conf);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bss = conf->last_bss = conf->bss;
|
bss = conf->last_bss = conf->bss;
|
||||||
|
|
||||||
while (fgets(buf, sizeof(buf), f)) {
|
while (fgets(buf, sizeof(buf), f)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user