]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0 server: Event log entry on missing configuration for the realm
authorJouni Malinen <quic_jouni@quicinc.com>
Fri, 11 Mar 2022 17:44:58 +0000 (19:44 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 11 Mar 2022 17:44:58 +0000 (19:44 +0200)
Make the error reason clearer in the event log for the case where the
requested realm has not been configured.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
hs20/server/spp_server.c

index a50e9074f7b43c48be3f14f2ae8d099fca6575e5..72694be6e89988324d571530e1f486d9908ca2ac 100644 (file)
@@ -1385,8 +1385,11 @@ static xml_node_t * hs20_subscription_registration(struct hs20_svc *ctx,
                           SUBSCRIPTION_REGISTRATION, mac_addr) < 0)
                return NULL;
        val = db_get_osu_config_val(ctx, realm, "signup_url");
-       if (val == NULL)
+       if (!val) {
+               hs20_eventlog(ctx, NULL, realm, session_id,
+                             "signup_url not configured in osu_config", NULL);
                return NULL;
+       }
 
        spp_node = build_post_dev_data_response(ctx, &ns, session_id, "OK",
                                                NULL);