mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
return with reason code
This commit is contained in:
parent
0cde3df6de
commit
a643265a27
2 changed files with 6 additions and 4 deletions
|
@ -35,4 +35,4 @@ config metric
|
|||
option min_probe_count '4'
|
||||
option bandwith_threshold '6'
|
||||
option use_station_count '1'
|
||||
option eval_probe_req '1'
|
||||
option eval_probe_req '0'
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#define ETH_ALEN 6
|
||||
#endif
|
||||
|
||||
#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
|
||||
|
||||
#include "ubus.h"
|
||||
|
||||
#include "networksocket.h"
|
||||
|
@ -371,12 +373,12 @@ static int handle_auth_req(struct blob_attr *msg) {
|
|||
// block if entry was not already found in probe database
|
||||
if (!(mac_is_equal(tmp.bssid_addr, auth_req.bssid_addr) && mac_is_equal(tmp.client_addr, auth_req.client_addr))) {
|
||||
printf("DENY AUTH!\n");
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
return WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
|
||||
}
|
||||
|
||||
if (!decide_function(&tmp)) {
|
||||
printf("DENY AUTH\n");
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
return WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
|
||||
}
|
||||
|
||||
// maybe add here if a client is already connected...
|
||||
|
@ -406,7 +408,7 @@ static int handle_probe_req(struct blob_attr *msg) {
|
|||
|
||||
if (!decide_function(&tmp_prob_req)) {
|
||||
//printf("MAC WILL BE DECLINED!!!\n");
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
return WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
|
||||
}
|
||||
//printf("MAC WILL BE ACCEPDTED!!!\n");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue