]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: Record policy update into users table
authorJouni Malinen <jouni@codeaurora.org>
Fri, 19 Oct 2018 16:00:37 +0000 (19:00 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 19 Oct 2018 16:00:37 +0000 (19:00 +0300)
This makes it easier to track whether a policy update has been
successfully completed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
hs20/server/spp_server.c
hs20/server/sql.txt

index 584a2bde634c70992e7f7c824f5ae7333d7cf64c..e5af4c255c6904a1d37634ebd420a101f62dec19 100644 (file)
@@ -2262,6 +2262,9 @@ static xml_node_t * hs20_spp_update_response(struct hs20_svc *ctx,
                                              "", dmacc);
                        free(val);
                }
+               if (oper == POLICY_UPDATE)
+                       db_update_val(ctx, user, realm, "polupd_done", "1",
+                                     dmacc);
                ret = build_spp_exchange_complete(
                        ctx, session_id,
                        "Exchange complete, release TLS connection", NULL);
index 8fa019f574b196603f4468c95316a40508727d2f..666ef1314a2894691e68d1fac49bb12f0abaec25 100644 (file)
@@ -55,7 +55,8 @@ CREATE TABLE users(
        cert_pem TEXT,
        t_c_timestamp INTEGER,
        mac_addr TEXT,
-       last_msk TEXT
+       last_msk TEXT,
+       polupd_done TEXT,
 );
 
 CREATE TABLE wildcards(