diff --git a/src/include/datastorage.h b/src/include/datastorage.h index b0471d7..2b1d1f7 100644 --- a/src/include/datastorage.h +++ b/src/include/datastorage.h @@ -27,6 +27,8 @@ void insert_macs_from_file(); int insert_to_maclist(uint8_t mac[]); +int mac_in_maclist(uint8_t mac[]); + /* Metric */ diff --git a/src/storage/datastorage.c b/src/storage/datastorage.c index c771ce7..8ffc800 100644 --- a/src/storage/datastorage.c +++ b/src/storage/datastorage.c @@ -41,8 +41,6 @@ int probe_array_update_rssi(uint8_t bssid_addr[], uint8_t client_addr[], uint32_ int is_connected(uint8_t bssid_addr[], uint8_t client_addr[]); -int mac_in_maclist(uint8_t mac[]); - int compare_station_count(uint8_t *bssid_addr_own, uint8_t *bssid_addr_to_compare, uint8_t *client_addr, int automatic_kick); int compare_ssid(uint8_t *bssid_addr_own, uint8_t *bssid_addr_to_compare); diff --git a/src/utils/ubus.c b/src/utils/ubus.c index a3ff3ed..6639b59 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -286,6 +286,11 @@ void blobmsg_add_macaddr(struct blob_buf *buf, const char *name, const uint8_t * static int decide_function(probe_entry *prob_req, int req_type) { printf("COUNTER: %d\n", prob_req->counter); + if(mac_in_maclist(prob_req->client_addr)) + { + return 1; + } + if (prob_req->counter < dawn_metric.min_probe_count) { return 0; }