mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Merge pull request #39 from berlin-open-wireless-lab/feature/return_reason_code
Feature/return reason code
This commit is contained in:
commit
f4d5133c80
1 changed files with 5 additions and 3 deletions
|
@ -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