mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
Make RADIUS server MIB available through control interface
"MIB radius_server" control interface can now be used to fetch the RADIUS server MIB data from hostapd. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f538be3e82
commit
4c03a2b3e1
@ -20,6 +20,7 @@
|
|||||||
#include "common/ieee802_11_defs.h"
|
#include "common/ieee802_11_defs.h"
|
||||||
#include "drivers/driver.h"
|
#include "drivers/driver.h"
|
||||||
#include "radius/radius_client.h"
|
#include "radius/radius_client.h"
|
||||||
|
#include "radius/radius_server.h"
|
||||||
#include "ap/hostapd.h"
|
#include "ap/hostapd.h"
|
||||||
#include "ap/ap_config.h"
|
#include "ap/ap_config.h"
|
||||||
#include "ap/ieee802_1x.h"
|
#include "ap/ieee802_1x.h"
|
||||||
@ -1083,6 +1084,19 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_data *hapd, char *pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int hostapd_ctrl_iface_mib(struct hostapd_data *hapd, char *reply,
|
||||||
|
int reply_size, const char *param)
|
||||||
|
{
|
||||||
|
#ifdef RADIUS_SERVER
|
||||||
|
if (os_strcmp(param, "radius_server") == 0) {
|
||||||
|
return radius_server_get_mib(hapd->radius_srv, reply,
|
||||||
|
reply_size);
|
||||||
|
}
|
||||||
|
#endif /* RADIUS_SERVER */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
|
static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
|
||||||
void *sock_ctx)
|
void *sock_ctx)
|
||||||
{
|
{
|
||||||
@ -1155,6 +1169,9 @@ static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
|
|||||||
reply_len += res;
|
reply_len += res;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_RADIUS */
|
#endif /* CONFIG_NO_RADIUS */
|
||||||
|
} else if (os_strncmp(buf, "MIB ", 4) == 0) {
|
||||||
|
reply_len = hostapd_ctrl_iface_mib(hapd, reply, reply_size,
|
||||||
|
buf + 4);
|
||||||
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
||||||
reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
|
reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
|
||||||
reply_size);
|
reply_size);
|
||||||
|
@ -224,6 +224,11 @@ static int hostapd_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
|||||||
|
|
||||||
static int hostapd_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
static int hostapd_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
if (argc > 0) {
|
||||||
|
char buf[100];
|
||||||
|
os_snprintf(buf, sizeof(buf), "MIB %s", argv[0]);
|
||||||
|
return wpa_ctrl_command(ctrl, buf);
|
||||||
|
}
|
||||||
return wpa_ctrl_command(ctrl, "MIB");
|
return wpa_ctrl_command(ctrl, "MIB");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user