]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Mark pubkey/comeback arguments constant for frame construction
authorJouni Malinen <j@w1.fi>
Sun, 21 Mar 2021 16:30:52 +0000 (18:30 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 21 Mar 2021 16:30:52 +0000 (18:30 +0200)
These parameters are only copied to the frame, so mark them as constant.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/wpa_common.c
src/common/wpa_common.h
wpa_supplicant/pasn_supplicant.c

index 493da18d72650b680f824e54ffced5d9c5ade94c..04461516f1380144ba72948134182a8babb80033 100644 (file)
@@ -3428,8 +3428,8 @@ int wpa_pasn_add_rsne(struct wpabuf *buf, const u8 *pmkid, int akmp, int cipher)
  */
 void wpa_pasn_add_parameter_ie(struct wpabuf *buf, u16 pasn_group,
                               u8 wrapped_data_format,
-                              struct wpabuf *pubkey, bool compressed,
-                              struct wpabuf *comeback, int after)
+                              const struct wpabuf *pubkey, bool compressed,
+                              const struct wpabuf *comeback, int after)
 {
        struct pasn_parameter_ie *params;
 
index e51e19483e7975b07629b06a3a2e6f9893145a0a..a1ff895659cbea03a33d3c43f81325a67ff0122b 100644 (file)
@@ -662,8 +662,8 @@ int wpa_pasn_add_rsne(struct wpabuf *buf, const u8 *pmkid,
 
 void wpa_pasn_add_parameter_ie(struct wpabuf *buf, u16 pasn_group,
                               u8 wrapped_data_format,
-                              struct wpabuf *pubkey, bool compressed,
-                              struct wpabuf *comeback, int after);
+                              const struct wpabuf *pubkey, bool compressed,
+                              const struct wpabuf *comeback, int after);
 
 int wpa_pasn_add_wrapped_data(struct wpabuf *buf,
                              struct wpabuf *wrapped_data_buf);
index 2d7d819c9bacb1a0f278cb60bcaf1560ac67761e..cacba7c26bf50351406af0d902cc0b4bdf59dfff 100644 (file)
@@ -636,7 +636,7 @@ static u8 wpas_pasn_get_wrapped_data_format(struct wpas_pasn *pasn)
 
 
 static struct wpabuf * wpas_pasn_build_auth_1(struct wpa_supplicant *wpa_s,
-                                             struct wpabuf *comeback)
+                                             const struct wpabuf *comeback)
 {
        struct wpas_pasn *pasn = &wpa_s->pasn;
        struct wpabuf *buf, *pubkey = NULL, *wrapped_data_buf = NULL;