From fd648a9f137e4b692349af6514e62c5c3f76cbc8 Mon Sep 17 00:00:00 2001 From: Luca Passarella Date: Tue, 23 May 2023 10:27:52 +0200 Subject: [PATCH] ubus: actually deny association when no probe entry is found Set return value to `dawn_metric.deny_assoc_reason` to deny the association. [rewrite commit message] Signed-off-by: Nick Hainke --- src/utils/ubus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 616e09b..5673ba9 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -484,6 +484,7 @@ static int handle_assoc_req(struct blob_attr *msg) { // block if entry was not already found in probe database if (own_probe == NULL) { dawnlog_trace(MACSTR " Deny association due to no probe entry found", MAC2STR(assoc_req->client_addr.u8)); + ret = dawn_metric.deny_assoc_reason; } else if (own_probe->counter < dawn_metric.min_probe_count) { dawnlog_trace(MACSTR " Deny association due to low probe count", MAC2STR(assoc_req->client_addr.u8));