]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Mark addr argument to storing PTKSA const
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 21 Feb 2023 15:24:30 +0000 (17:24 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 21 Feb 2023 15:27:29 +0000 (17:27 +0200)
This is not being modified, so mark it const to be more flexible for the
caller.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/rsn_supp/wpa.h
src/rsn_supp/wpa_i.h
wpa_supplicant/wpas_glue.c

index c79ebfceab2febae101d3fa9cec23d3dcd475935..76d6031380c8cc646ce50304f280b6cd6270982d 100644 (file)
@@ -92,7 +92,7 @@ struct wpa_sm_ctx {
                            const u8 *pkt, size_t pkt_len);
        int (*channel_info)(void *ctx, struct wpa_channel_info *ci);
        void (*transition_disable)(void *ctx, u8 bitmap);
-       void (*store_ptk)(void *ctx, u8 *addr, int cipher,
+       void (*store_ptk)(void *ctx, const u8 *addr, int cipher,
                          u32 life_time, const struct wpa_ptk *ptk);
 #ifdef CONFIG_PASN
        int (*set_ltf_keyseed)(void *ctx, const u8 *own_addr,
index ed43cc153bd1e9ff869fb15137abc381e12b0114..a3c13b116b114680c5cf15a88c50ca72d0ace5f0 100644 (file)
@@ -477,7 +477,7 @@ static inline void wpa_sm_transition_disable(struct wpa_sm *sm, u8 bitmap)
 }
 
 static inline void wpa_sm_store_ptk(struct wpa_sm *sm,
-                                   u8 *addr, int cipher,
+                                   const u8 *addr, int cipher,
                                    u32 life_time, struct wpa_ptk *ptk)
 {
        if (sm->ctx->store_ptk)
index e5a4053c838e2862cebe3527a2354f1cf0e0d6ef..c4cfca50e62a1774b778c282ff996bf41fa07b57 100644 (file)
@@ -1360,7 +1360,7 @@ static void wpa_supplicant_transition_disable(void *_wpa_s, u8 bitmap)
 }
 
 
-static void wpa_supplicant_store_ptk(void *ctx, u8 *addr, int cipher,
+static void wpa_supplicant_store_ptk(void *ctx, const u8 *addr, int cipher,
                                     u32 life_time, const struct wpa_ptk *ptk)
 {
        struct wpa_supplicant *wpa_s = ctx;