]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Avoid compiler warnings on printing out u64 in 32-bit builds
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 2 Oct 2024 21:52:19 +0000 (00:52 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 2 Oct 2024 21:52:19 +0000 (00:52 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wlantest/rx_mgmt.c
wlantest/test_vectors.c

index 06bc904f6fca5d3647db37dd95d2c5a9238ea394..ecb56e2c91ab8532a693cadb5215e8da8522c8a5 100644 (file)
@@ -580,8 +580,9 @@ static void rx_mgmt_beacon(struct wlantest *wt, const u8 *data, size_t len)
 
        rx_bipn = WPA_GET_LE48(mme + 2);
        wpa_printf(MSG_DEBUG, "Beacon frame BSSID " MACSTR
-                  " MME KeyID %u BIPN 0x%lx",
-                  MAC2STR(mgmt->bssid), keyid, rx_bipn);
+                  " MME KeyID %u BIPN 0x%llx",
+                  MAC2STR(mgmt->bssid), keyid,
+                  (long long unsigned int) rx_bipn);
        wpa_hexdump(MSG_MSGDUMP, "MME MIC", mme + 8, mic_len);
 
        if (!bss->igtk_len[keyid]) {
@@ -593,8 +594,9 @@ static void rx_mgmt_beacon(struct wlantest *wt, const u8 *data, size_t len)
 
        if (rx_bipn <= bss->ipn[keyid]) {
                add_note(wt, MSG_INFO, "BIP replay detected: SA=" MACSTR
-                        " RX BIPN 0x%lx <= 0x%lx",
-                        MAC2STR(mgmt->sa), rx_bipn, bss->ipn[keyid]);
+                        " RX BIPN 0x%llx <= 0x%llx",
+                        MAC2STR(mgmt->sa), (long long unsigned int) rx_bipn,
+                        (long long unsigned int) bss->ipn[keyid]);
        }
 
        if (check_mmie_mic(bss->mgmt_group_cipher, bss->igtk[keyid],
@@ -3160,7 +3162,8 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len)
        }
 
        rx_ipn = WPA_GET_LE48(mmie + 2);
-       wpa_printf(MSG_DEBUG, "MME KeyID %u IPN 0x%lx", keyid, rx_ipn);
+       wpa_printf(MSG_DEBUG, "MME KeyID %u IPN 0x%llx", keyid,
+                  (long long unsigned int) rx_ipn);
        wpa_hexdump(MSG_MSGDUMP, "MMIE MIC", mmie + 8, mic_len);
 
        if (!bss->igtk_len[keyid]) {
@@ -3170,8 +3173,9 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len)
 
        if (rx_ipn <= bss->ipn[keyid]) {
                add_note(wt, MSG_INFO, "BIP replay detected: SA=" MACSTR
-                        " RX IPN 0x%lx <= 0x%lx",
-                        MAC2STR(mgmt->sa), rx_ipn, bss->ipn[keyid]);
+                        " RX IPN 0x%llx <= 0x%llx",
+                        MAC2STR(mgmt->sa), (long long unsigned int) rx_ipn,
+                        (long long unsigned int) bss->ipn[keyid]);
        }
 
        if (check_mmie_mic(bss->mgmt_group_cipher, bss->igtk[keyid],
index 3b6d78bc12345efd775e31121947faf10924d1fb..6490a7f6d21cfc81446a8a792ed69a3d3e6c3f5a 100644 (file)
@@ -364,7 +364,7 @@ static void test_vector_bip(void)
                   "Deauthentication frame\n");
 
        wpa_hexdump(MSG_INFO, "IGTK", igtk, sizeof(igtk));
-       wpa_printf(MSG_INFO, "IPN: 0x%lx", ipn);
+       wpa_printf(MSG_INFO, "IPN: 0x%llx", (long long unsigned int) ipn);
        wpa_hexdump(MSG_INFO, "Plaintext frame", frame, sizeof(frame));
 
        prot = bip_protect(igtk, sizeof(igtk), frame, sizeof(frame),