logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 2c068b8c5a0235b6cab7b184fef6442735d07880
parent 8f11cca1b423bc342f118b374ecf348a76e2ac3e
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  4 Apr 2025 12:46:18 -0700

wpa_supplicant: Update to 2.11

Diffstat:

Mpkg/wpa_supplicant/.gitignore2+-
Mpkg/wpa_supplicant/config.h3+++
Mpkg/wpa_supplicant/gen.lua14+++++++++++---
Dpkg/wpa_supplicant/patch/0002-Avoid-statement-expressions-for-get_aligned_le.patch47-----------------------------------------------
Apkg/wpa_supplicant/patch/0002-Avoid-unnecessary-VLA.patch25+++++++++++++++++++++++++
Dpkg/wpa_supplicant/patch/0003-Avoid-unnecessary-VLA.patch25-------------------------
Apkg/wpa_supplicant/patch/0003-Prevent-reference-to-undefined-symbol-with-CONFIG_NO.patch33+++++++++++++++++++++++++++++++++
Apkg/wpa_supplicant/patch/0004-Add-support-for-some-BearSSL-crypto-primitives.patch102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpkg/wpa_supplicant/patch/0004-Prevent-reference-to-undefined-symbol-with-CONFIG_NO.patch33---------------------------------
Dpkg/wpa_supplicant/patch/0005-Add-support-for-some-BearSSL-crypo-primitives.patch98-------------------------------------------------------------------------------
Mpkg/wpa_supplicant/sha2562+-
Mpkg/wpa_supplicant/url2+-
Mpkg/wpa_supplicant/ver2+-
13 files changed, 178 insertions(+), 210 deletions(-)

diff --git a/pkg/wpa_supplicant/.gitignore b/pkg/wpa_supplicant/.gitignore @@ -1,2 +1,2 @@ /src -/wpa_supplicant-2.9.tar.gz +/wpa_supplicant-2.11.tar.gz diff --git a/pkg/wpa_supplicant/config.h b/pkg/wpa_supplicant/config.h @@ -11,6 +11,9 @@ #define CONFIG_NO_CONFIG_WRITE #define CONFIG_NO_RADIUS #define CONFIG_NO_VLAN +#define CONFIG_NO_WMM_AC +#define CONFIG_NO_TKIP +#define CONFIG_NO_ROBUST_AV #define CONFIG_SHA256 #define CONFIG_SME #define TLS_DEFAULT_CIPHERS "DEFAULT:!EXP:!LOW" diff --git a/pkg/wpa_supplicant/gen.lua b/pkg/wpa_supplicant/gen.lua @@ -25,12 +25,14 @@ exe('bin/wpa_supplicant', [[ ctrl_iface_common.c hw_features_common.c ieee802_11_common.c + ptksa_cache.c wpa_common.c ) src/crypto/( aes-internal-dec.c aes-internal-enc.c aes-internal.c + aes-omac1.c aes-unwrap.c aes-wrap.c crypto_bearssl.c @@ -60,9 +62,15 @@ exe('bin/wpa_supplicant', [[ wpa.c wpa_ie.c ) - src/utils/(bitfield.c radiotap.c) + src/utils/( + bitfield.c + config.c + crc32.c + ip_addr.c + radiotap.c + ) wpa_supplicant/( - blacklist.c + bssid_ignore.c bss.c config.c config_file.c @@ -77,7 +85,7 @@ exe('bin/wpa_supplicant', [[ rrm.c scan.c sme.c - wmm_ac.c + twt.c wpa_supplicant.c wpas_glue.c ) diff --git a/pkg/wpa_supplicant/patch/0002-Avoid-statement-expressions-for-get_aligned_le.patch b/pkg/wpa_supplicant/patch/0002-Avoid-statement-expressions-for-get_aligned_le.patch @@ -1,47 +0,0 @@ -From 9698f90ccec779f7812a9aa550a6b77feefb52e3 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 11 Aug 2019 03:41:23 +0000 -Subject: [PATCH] Avoid statement expressions for get_aligned_le* - ---- - src/utils/platform.h | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/utils/platform.h b/src/utils/platform.h -index 813987eb6..1aa9dc069 100644 ---- a/src/utils/platform.h -+++ b/src/utils/platform.h -@@ -4,18 +4,18 @@ - #include "includes.h" - #include "common.h" - --#define le16_to_cpu le_to_host16 --#define le32_to_cpu le_to_host32 -+static inline u16 get_unaligned_le16(void *p) -+{ -+ u16 v; -+ memcpy(&v, p, sizeof(v)); -+ return le_to_host16(v); -+} - --#define get_unaligned(p) \ --({ \ -- struct packed_dummy_struct { \ -- typeof(*(p)) __val; \ -- } __attribute__((packed)) *__ptr = (void *) (p); \ -- \ -- __ptr->__val; \ --}) --#define get_unaligned_le16(p) le16_to_cpu(get_unaligned((le16 *)(p))) --#define get_unaligned_le32(p) le32_to_cpu(get_unaligned((le32 *)(p))) -+static inline u32 get_unaligned_le32(void *p) -+{ -+ u32 v; -+ memcpy(&v, p, sizeof(v)); -+ return le_to_host32(v); -+} - - #endif /* PLATFORM_H */ --- -2.22.0 - diff --git a/pkg/wpa_supplicant/patch/0002-Avoid-unnecessary-VLA.patch b/pkg/wpa_supplicant/patch/0002-Avoid-unnecessary-VLA.patch @@ -0,0 +1,25 @@ +From 9573da0c85c0b03fe3f11d417af280bca27ecc6b Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 11 Aug 2019 03:44:24 +0000 +Subject: [PATCH] Avoid unnecessary VLA + +--- + src/utils/os_unix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c +index 679f3a0dc..aca086c22 100644 +--- a/src/utils/os_unix.c ++++ b/src/utils/os_unix.c +@@ -831,7 +831,7 @@ int os_exec(const char *program, const char *arg, int wait_completion) + + if (pid == 0) { + /* run the external command in the child process */ +- const int MAX_ARG = 30; ++ enum { MAX_ARG = 30 }; + char *_program, *_arg, *pos; + char *argv[MAX_ARG + 1]; + int i; +-- +2.45.2 + diff --git a/pkg/wpa_supplicant/patch/0003-Avoid-unnecessary-VLA.patch b/pkg/wpa_supplicant/patch/0003-Avoid-unnecessary-VLA.patch @@ -1,25 +0,0 @@ -From 936dcefafa77e985a9e8dd2b6f5ef96df16d4c03 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 11 Aug 2019 03:44:24 +0000 -Subject: [PATCH] Avoid unnecessary VLA - ---- - src/utils/os_unix.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c -index 800c50772..447dae31b 100644 ---- a/src/utils/os_unix.c -+++ b/src/utils/os_unix.c -@@ -801,7 +801,7 @@ int os_exec(const char *program, const char *arg, int wait_completion) - - if (pid == 0) { - /* run the external command in the child process */ -- const int MAX_ARG = 30; -+ enum { MAX_ARG = 30 }; - char *_program, *_arg, *pos; - char *argv[MAX_ARG + 1]; - int i; --- -2.22.0 - diff --git a/pkg/wpa_supplicant/patch/0003-Prevent-reference-to-undefined-symbol-with-CONFIG_NO.patch b/pkg/wpa_supplicant/patch/0003-Prevent-reference-to-undefined-symbol-with-CONFIG_NO.patch @@ -0,0 +1,33 @@ +From ac2e14a8697e4d3f3fe7237b58e98a387b0c4b9d Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 11 Aug 2019 04:00:13 +0000 +Subject: [PATCH] Prevent reference to undefined symbol with CONFIG_NO_RADIUS + +--- + src/radius/radius.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/radius/radius.h b/src/radius/radius.h +index 05fddbaf2..ec21150f7 100644 +--- a/src/radius/radius.h ++++ b/src/radius/radius.h +@@ -330,6 +330,7 @@ char * radius_msg_get_tunnel_password(struct radius_msg *msg, int *keylen, + const u8 *secret, size_t secret_len, + struct radius_msg *sent_msg, size_t n); + ++#ifndef CONFIG_NO_RADIUS + static inline int radius_msg_add_attr_int32(struct radius_msg *msg, u8 type, + u32 value) + { +@@ -349,6 +350,8 @@ static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type, + *value = ntohl(val); + return 0; + } ++#endif /* CONFIG_NO_RADIUS */ ++ + int radius_msg_get_attr_ptr(struct radius_msg *msg, u8 type, u8 **buf, + size_t *len, const u8 *start); + int radius_msg_count_attr(struct radius_msg *msg, u8 type, int min_len); +-- +2.45.2 + diff --git a/pkg/wpa_supplicant/patch/0004-Add-support-for-some-BearSSL-crypto-primitives.patch b/pkg/wpa_supplicant/patch/0004-Add-support-for-some-BearSSL-crypto-primitives.patch @@ -0,0 +1,102 @@ +From ea00c8e557fe645a1ef0b6c0ebe2209514f9f94f Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Fri, 15 Nov 2019 20:19:37 -0800 +Subject: [PATCH] Add support for some BearSSL crypto primitives + +--- + src/crypto/crypto_bearssl.c | 83 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 83 insertions(+) + create mode 100644 src/crypto/crypto_bearssl.c + +diff --git a/src/crypto/crypto_bearssl.c b/src/crypto/crypto_bearssl.c +new file mode 100644 +index 000000000..db2bfbc27 +--- /dev/null ++++ b/src/crypto/crypto_bearssl.c +@@ -0,0 +1,83 @@ ++/* ++ * Wrapper functions for BearSSL crypto ++ * Copyright (c) 2019, Michael Forney <mforney@mforney.org> ++ * ++ * This software may be distributed under the terms of the BSD license. ++ * See README for more details. ++ */ ++ ++#include "includes.h" ++#include <bearssl.h> ++ ++#include "common.h" ++#include "md5.h" ++#include "crypto.h" ++ ++int digest_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out, ++ const br_hash_class *hash) ++{ ++ br_hash_compat_context ctx; ++ size_t i; ++ ++ hash->init(&ctx.vtable); ++ for (i = 0; i < num_elem; ++i) ++ hash->update(&ctx.vtable, addr[i], len[i]); ++ hash->out(&ctx.vtable, out); ++ ++ return 0; ++} ++ ++int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) ++{ ++ return digest_vector(num_elem, addr, len, out, &br_sha1_vtable); ++} ++ ++int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) ++{ ++ return digest_vector(num_elem, addr, len, out, &br_sha256_vtable); ++} ++ ++static int hmac_vector(const u8 *key, size_t key_len, size_t num_elem, ++ const u8 *addr[], const size_t *len, u8 *mac, ++ const br_hash_class *type) ++{ ++ br_hmac_key_context kc; ++ br_hmac_context ctx; ++ size_t i; ++ ++ br_hmac_key_init(&kc, type, key, key_len); ++ br_hmac_init(&ctx, &kc, 0); ++ for (i = 0; i < num_elem; ++i) ++ br_hmac_update(&ctx, addr[i], len[i]); ++ br_hmac_out(&ctx, mac); ++ ++ return 0; ++} ++ ++int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, ++ const u8 *addr[], const size_t *len, u8 *mac) ++{ ++ return hmac_vector(key, key_len, num_elem, addr, len, mac, &br_sha256_vtable); ++} ++ ++int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, ++ const u8 *addr[], const size_t *len, u8 *mac) ++{ ++ return hmac_vector(key, key_len, num_elem, addr, len, mac, &br_sha1_vtable); ++} ++ ++int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, ++ u8 *mac) ++{ ++ return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); ++} ++ ++int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, ++ u8 *mac) ++{ ++ return hmac_vector(key, key_len, 1, &data, &data_len, mac, &br_md5_vtable); ++} ++ ++void crypto_unload(void) ++{ ++} +-- +2.45.2 + diff --git a/pkg/wpa_supplicant/patch/0004-Prevent-reference-to-undefined-symbol-with-CONFIG_NO.patch b/pkg/wpa_supplicant/patch/0004-Prevent-reference-to-undefined-symbol-with-CONFIG_NO.patch @@ -1,33 +0,0 @@ -From 5fba603af060a3fd3f0436213527b4b2b74cbd0d Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 11 Aug 2019 04:00:13 +0000 -Subject: [PATCH] Prevent reference to undefined symbol with CONFIG_NO_RADIUS - ---- - src/radius/radius.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/radius/radius.h b/src/radius/radius.h -index 630c0f9d0..dd013c415 100644 ---- a/src/radius/radius.h -+++ b/src/radius/radius.h -@@ -296,6 +296,7 @@ char * radius_msg_get_tunnel_password(struct radius_msg *msg, int *keylen, - const u8 *secret, size_t secret_len, - struct radius_msg *sent_msg, size_t n); - -+#ifndef CONFIG_NO_RADIUS - static inline int radius_msg_add_attr_int32(struct radius_msg *msg, u8 type, - u32 value) - { -@@ -315,6 +316,8 @@ static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type, - *value = ntohl(val); - return 0; - } -+#endif /* CONFIG_NO_RADIUS */ -+ - int radius_msg_get_attr_ptr(struct radius_msg *msg, u8 type, u8 **buf, - size_t *len, const u8 *start); - int radius_msg_count_attr(struct radius_msg *msg, u8 type, int min_len); --- -2.22.0 - diff --git a/pkg/wpa_supplicant/patch/0005-Add-support-for-some-BearSSL-crypo-primitives.patch b/pkg/wpa_supplicant/patch/0005-Add-support-for-some-BearSSL-crypo-primitives.patch @@ -1,98 +0,0 @@ -From f7dc64ef991c146a491d0ed0a92d2a5890383143 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Fri, 15 Nov 2019 20:19:37 -0800 -Subject: [PATCH] Add support for some BearSSL crypo primitives - ---- - src/crypto/crypto_bearssl.c | 79 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 79 insertions(+) - create mode 100644 src/crypto/crypto_bearssl.c - -diff --git a/src/crypto/crypto_bearssl.c b/src/crypto/crypto_bearssl.c -new file mode 100644 -index 000000000..bc29f9693 ---- /dev/null -+++ b/src/crypto/crypto_bearssl.c -@@ -0,0 +1,79 @@ -+/* -+ * Wrapper functions for BearSSL crypto -+ * Copyright (c) 2019, Michael Forney <mforney@mforney.org> -+ * -+ * This software may be distributed under the terms of the BSD license. -+ * See README for more details. -+ */ -+ -+#include "includes.h" -+#include <bearssl.h> -+ -+#include "common.h" -+#include "md5.h" -+#include "crypto.h" -+ -+int digest_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out, -+ const br_hash_class *hash) -+{ -+ br_hash_compat_context ctx; -+ size_t i; -+ -+ hash->init(&ctx.vtable); -+ for (i = 0; i < num_elem; ++i) -+ hash->update(&ctx.vtable, addr[i], len[i]); -+ hash->out(&ctx.vtable, out); -+ -+ return 0; -+} -+ -+int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) -+{ -+ return digest_vector(num_elem, addr, len, out, &br_sha1_vtable); -+} -+ -+int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) -+{ -+ return digest_vector(num_elem, addr, len, out, &br_sha256_vtable); -+} -+ -+static int hmac_vector(const u8 *key, size_t key_len, size_t num_elem, -+ const u8 *addr[], const size_t *len, u8 *mac, -+ const br_hash_class *type) -+{ -+ br_hmac_key_context kc; -+ br_hmac_context ctx; -+ size_t i; -+ -+ br_hmac_key_init(&kc, type, key, key_len); -+ br_hmac_init(&ctx, &kc, 0); -+ for (i = 0; i < num_elem; ++i) -+ br_hmac_update(&ctx, addr[i], len[i]); -+ br_hmac_out(&ctx, mac); -+ -+ return 0; -+} -+ -+int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, -+ const u8 *addr[], const size_t *len, u8 *mac) -+{ -+ return hmac_vector(key, key_len, num_elem, addr, len, mac, &br_sha256_vtable); -+} -+ -+int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, -+ const u8 *addr[], const size_t *len, u8 *mac) -+{ -+ return hmac_vector(key, key_len, num_elem, addr, len, mac, &br_sha1_vtable); -+} -+ -+int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, -+ u8 *mac) -+{ -+ return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); -+} -+ -+int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, -+ u8 *mac) -+{ -+ return hmac_vector(key, key_len, 1, &data, &data_len, mac, &br_md5_vtable); -+} --- -2.24.0 - diff --git a/pkg/wpa_supplicant/sha256 b/pkg/wpa_supplicant/sha256 @@ -1 +1 @@ -fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17 wpa_supplicant-2.9.tar.gz +912ea06f74e30a8e36fbb68064d6cdff218d8d591db0fc5d75dee6c81ac7fc0a wpa_supplicant-2.11.tar.gz diff --git a/pkg/wpa_supplicant/url b/pkg/wpa_supplicant/url @@ -1 +1 @@ -url = "http://w1.fi/releases/wpa_supplicant-2.9.tar.gz" +url = "http://w1.fi/releases/wpa_supplicant-2.11.tar.gz" diff --git a/pkg/wpa_supplicant/ver b/pkg/wpa_supplicant/ver @@ -1 +1 @@ -2.9 r0 +2.11 r0