* [PATCH 1/5] defs: Add defs.h to hold certain global definitions
@ 2024-08-23 16:18 Denis Kenzior
2024-08-23 16:18 ` [PATCH 2/5] monitor: Don't dump survey results with noscan Denis Kenzior
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Denis Kenzior @ 2024-08-23 16:18 UTC (permalink / raw)
To: iwd; +Cc: Denis Kenzior
This will help to get rid of magic number use throughout the project.
The definitions should be limited to global magic numbers that are used
throughout the project, for example SSID length, MAC address length,
etc.
---
Makefile.am | 3 ++-
src/ap.c | 8 ++++----
src/crypto.c | 3 ++-
src/defs.h | 13 +++++++++++++
src/dpp-util.h | 5 ++++-
src/eap-wsc.c | 4 ++--
src/handshake.h | 2 +-
src/ie.c | 2 +-
src/ie.h | 3 ++-
src/knownnetworks.h | 4 +++-
src/network.c | 2 +-
src/p2putil.h | 3 ++-
src/rrm.c | 4 ++--
src/scan.c | 2 +-
src/scan.h | 4 +++-
src/station.c | 4 ++--
src/storage.c | 3 ++-
src/util.c | 5 +++--
src/wsc.h | 2 +-
src/wscutil.c | 2 +-
src/wscutil.h | 4 +++-
unit/test-util.c | 3 ++-
22 files changed, 57 insertions(+), 28 deletions(-)
create mode 100644 src/defs.h
diff --git a/Makefile.am b/Makefile.am
index d438a5bad7e4..61d46d7dc1a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -214,7 +214,8 @@ eap_sources = src/eap.c src/eap.h src/eap-private.h \
if DAEMON
libexec_PROGRAMS += src/iwd
-src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \
+src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h \
+ src/missing.h src/defs.h \
src/netdev.h src/netdev.c \
src/wiphy.h src/wiphy.c \
src/device.c \
diff --git a/src/ap.c b/src/ap.c
index b4e7593e5eef..6650f0af6e89 100644
--- a/src/ap.c
+++ b/src/ap.c
@@ -67,7 +67,7 @@ struct ap_state {
ap_stopped_func_t stopped_func;
void *user_data;
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
char passphrase[64];
uint8_t psk[32];
enum band_freq band;
@@ -153,7 +153,7 @@ struct ap_wsc_pbc_probe_record {
};
struct ap_network {
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
int16_t signal;
enum security security;
};
@@ -181,7 +181,7 @@ static int network_signal_compare(const void *a, const void *b, void *user)
static struct ap_network *ap_network_find(struct ap_state *ap,
struct scan_bss *bss)
{
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
memcpy(ssid, bss->ssid, bss->ssid_len);
ssid[bss->ssid_len] = '\0';
@@ -3629,7 +3629,7 @@ static int ap_load_config(struct ap_state *ap, const struct l_settings *config,
return -ENOMSG;
len = strlen(strval);
- if (len < 1 || len > 32) {
+ if (len < 1 || len > SSID_MAX_SIZE) {
l_error("AP SSID length outside the [1, 32] range");
return -EINVAL;
}
diff --git a/src/crypto.c b/src/crypto.c
index 15a7cde784f0..35941a2e3c3c 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -35,6 +35,7 @@
#include "ell/useful.h"
#include "src/missing.h"
+#include "src/defs.h"
#include "src/crypto.h"
#define ARC4_MIN_KEY_SIZE 1
@@ -567,7 +568,7 @@ int crypto_psk_from_passphrase(const char *passphrase,
if (!crypto_passphrase_is_valid(passphrase))
return -ERANGE;
- if (ssid_len == 0 || ssid_len > 32)
+ if (ssid_len == 0 || ssid_len > SSID_MAX_SIZE)
return -ERANGE;
result = l_cert_pkcs5_pbkdf2(L_CHECKSUM_SHA1, passphrase,
diff --git a/src/defs.h b/src/defs.h
new file mode 100644
index 000000000000..b83763b85a10
--- /dev/null
+++ b/src/defs.h
@@ -0,0 +1,13 @@
+/*
+ * Wireless daemon for Linux
+ * Copyright (C) 2024 Cruise, LLC
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef __DEFS_H__
+#define __DEFS_H__
+
+#define SSID_MAX_SIZE 32
+
+#endif
diff --git a/src/dpp-util.h b/src/dpp-util.h
index dc8a894b2bb4..86ef36f9bb46 100644
--- a/src/dpp-util.h
+++ b/src/dpp-util.h
@@ -19,6 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+
+#include "src/defs.h"
+
struct l_ecc_point;
struct l_ecc_scalar;
enum ie_rsn_akm_suite;
@@ -112,7 +115,7 @@ enum dpp_attribute_type {
};
struct dpp_configuration {
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
size_t ssid_len;
uint32_t akm_suites;
char *passphrase;
diff --git a/src/eap-wsc.c b/src/eap-wsc.c
index 789a20f032b9..4e940bf8b668 100644
--- a/src/eap-wsc.c
+++ b/src/eap-wsc.c
@@ -2067,7 +2067,7 @@ static bool eap_wsc_r_load_settings(struct eap_state *eap,
str = l_settings_get_string(settings, "WSC", "WPA2-SSID");
if (str) {
- if (strlen(str) > 32)
+ if (strlen(str) > SSID_MAX_SIZE)
goto bad_string;
wsc->m2->auth_type_flags |=
@@ -2113,7 +2113,7 @@ static bool eap_wsc_r_load_settings(struct eap_state *eap,
str = l_settings_get_string(settings, "WSC", "Open-SSID");
if (str) {
- if (strlen(str) > 32)
+ if (strlen(str) > SSID_MAX_SIZE)
goto bad_string;
wsc->m2->auth_type_flags |= WSC_AUTHENTICATION_TYPE_OPEN;
diff --git a/src/handshake.h b/src/handshake.h
index 8a356e6b71f2..d1116472b177 100644
--- a/src/handshake.h
+++ b/src/handshake.h
@@ -141,7 +141,7 @@ struct handshake_state {
bool supplicant_ocvc : 1;
bool ext_key_id_capable : 1;
bool force_default_ecc_group : 1;
- uint8_t ssid[32];
+ uint8_t ssid[SSID_MAX_SIZE];
size_t ssid_len;
char *passphrase;
char *password_identifier;
diff --git a/src/ie.c b/src/ie.c
index b180291a686f..c8bb70b96ade 100644
--- a/src/ie.c
+++ b/src/ie.c
@@ -2642,7 +2642,7 @@ int ie_parse_owe_transition(const void *data, size_t len,
return -ENOMSG;
slen = l_get_u8(ie + 12);
- if (slen > 32)
+ if (slen > SSID_MAX_SIZE)
return -ENOMSG;
/*
diff --git a/src/ie.h b/src/ie.h
index 82945de676a9..4498785a8b6c 100644
--- a/src/ie.h
+++ b/src/ie.h
@@ -23,6 +23,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <unistd.h>
+#include "src/defs.h"
/*
* Information elements, IEEE Std 802.11-2012 ch. 8.4.2 and
@@ -565,7 +566,7 @@ struct ie_fils_ip_addr_response_info {
struct ie_owe_transition_info {
uint8_t bssid[6];
- uint8_t ssid[32];
+ uint8_t ssid[SSID_MAX_SIZE];
size_t ssid_len;
uint8_t oper_class;
uint8_t channel;
diff --git a/src/knownnetworks.h b/src/knownnetworks.h
index c81bd9aaaf77..a117ded55d86 100644
--- a/src/knownnetworks.h
+++ b/src/knownnetworks.h
@@ -20,6 +20,8 @@
*
*/
+#include "src/defs.h"
+
#define SETTINGS "Settings"
#define NET_HIDDEN SETTINGS, "Hidden"
#define NET_AUTOCONNECT SETTINGS, "AutoConnect"
@@ -84,7 +86,7 @@ struct network_config {
struct network_info {
const struct network_info_ops *ops;
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
enum security type;
struct l_queue *known_frequencies;
int seen_count; /* Ref count for network.info */
diff --git a/src/network.c b/src/network.c
index 300e8090df29..20d9a3ddb84f 100644
--- a/src/network.c
+++ b/src/network.c
@@ -63,7 +63,7 @@ static uint32_t known_networks_watch;
static uint32_t event_watch;
struct network {
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
enum security security;
char *object_path;
struct station *station;
diff --git a/src/p2putil.h b/src/p2putil.h
index 3a76414b04d4..7ca9fb2ec281 100644
--- a/src/p2putil.h
+++ b/src/p2putil.h
@@ -22,6 +22,7 @@
#include <stdint.h>
+#include "src/defs.h"
#include "src/wscutil.h"
struct l_queue;
@@ -285,7 +286,7 @@ struct p2p_client_info_descriptor {
struct p2p_group_id_attr {
uint8_t device_addr[6];
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
};
struct p2p_interface_attr {
diff --git a/src/rrm.c b/src/rrm.c
index 7054db36aed1..a11a653287d7 100644
--- a/src/rrm.c
+++ b/src/rrm.c
@@ -108,8 +108,8 @@ struct rrm_beacon_req_info {
uint8_t oper_class;
uint8_t channel; /* The single channel provided in request */
uint16_t duration;
- uint8_t bssid[6]; /* Request filtered by BSSID */
- char ssid[33]; /* Request filtered by SSID */
+ uint8_t bssid[6]; /* Request filtered by BSSID */
+ char ssid[SSID_MAX_SIZE + 1]; /* Request filtered by SSID */
bool has_ssid;
uint32_t scan_id;
uint64_t scan_start_time;
diff --git a/src/scan.c b/src/scan.c
index c46ef8a00c2d..9de235a82f0f 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -1325,7 +1325,7 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss,
switch (tag) {
case IE_TYPE_SSID:
- if (iter.len > 32)
+ if (iter.len > SSID_MAX_SIZE)
return false;
memcpy(bss->ssid, iter.data, iter.len);
diff --git a/src/scan.h b/src/scan.h
index 06753b8268c4..50adca7cdc73 100644
--- a/src/scan.h
+++ b/src/scan.h
@@ -20,6 +20,8 @@
*
*/
+#include "src/defs.h"
+
struct scan_freq_set;
struct ie_rsn_info;
struct ie_owe_transition_info;
@@ -62,7 +64,7 @@ struct scan_bss {
};
struct ie_owe_transition_info *owe_trans;
uint8_t mde[3];
- uint8_t ssid[32];
+ uint8_t ssid[SSID_MAX_SIZE];
uint8_t ssid_len;
uint8_t utilization;
uint8_t cc[3];
diff --git a/src/station.c b/src/station.c
index 333b0fa12691..30a1232ab570 100644
--- a/src/station.c
+++ b/src/station.c
@@ -498,7 +498,7 @@ static struct network *station_add_seen_bss(struct station *station,
struct network *network;
enum security security;
const char *path;
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
station_print_scan_bss(bss);
@@ -3916,7 +3916,7 @@ static struct l_dbus_message *station_dbus_connect_hidden_network(
if (!l_dbus_message_get_arguments(message, "s", &ssid))
return dbus_error_invalid_args(message);
- if (strlen(ssid) > 32)
+ if (strlen(ssid) > SSID_MAX_SIZE)
return dbus_error_invalid_args(message);
if (known_networks_find(ssid, SECURITY_PSK) ||
diff --git a/src/storage.c b/src/storage.c
index 4200030ca4f9..b756b1726618 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -45,6 +45,7 @@
#include "ell/useful.h"
#include "src/missing.h"
+#include "src/defs.h"
#include "src/common.h"
#include "src/storage.h"
#include "src/crypto.h"
@@ -315,7 +316,7 @@ const char *storage_network_ssid_from_path(const char *path,
return NULL;
if (filename[0] != '=') {
- if (end == filename || end - filename > 32)
+ if (end == filename || end - filename > SSID_MAX_SIZE)
return NULL;
for (c = filename; c < end; c++)
diff --git a/src/util.c b/src/util.c
index 69019dc8f712..5ce764ae6402 100644
--- a/src/util.c
+++ b/src/util.c
@@ -34,6 +34,7 @@
#include <ell/ell.h>
#include "ell/useful.h"
+#include "src/defs.h"
#include "src/util.h"
#include "src/band.h"
@@ -45,7 +46,7 @@ const char *util_ssid_to_utf8(size_t len, const uint8_t *ssid)
memset(buf, 0, sizeof(buf));
- if (len > 32)
+ if (len > SSID_MAX_SIZE)
goto no_ssid;
while (i < len && !ssid[i])
@@ -84,7 +85,7 @@ no_ssid:
bool util_ssid_is_utf8(size_t len, const uint8_t *ssid)
{
- if (len > 32)
+ if (len > SSID_MAX_SIZE)
return false;
return l_utf8_validate((const char *)ssid, len, NULL);
diff --git a/src/wsc.h b/src/wsc.h
index 35ce91998665..bb6ff648522a 100644
--- a/src/wsc.h
+++ b/src/wsc.h
@@ -21,7 +21,7 @@
*/
struct wsc_credentials_info {
- char ssid[33];
+ char ssid[SSID_MAX_SIZE + 1];
enum security security;
union {
uint8_t psk[32];
diff --git a/src/wscutil.c b/src/wscutil.c
index 12e2125a73b9..934deeda49b6 100644
--- a/src/wscutil.c
+++ b/src/wscutil.c
@@ -500,7 +500,7 @@ static bool extract_ssid(struct wsc_attr_iter *iter, void *data)
unsigned int len;
len = wsc_attr_iter_get_length(iter);
- if (len > 32)
+ if (len > SSID_MAX_SIZE)
return false;
ssid->iov_len = len;
diff --git a/src/wscutil.h b/src/wscutil.h
index 1d603d8ff644..91e74a5a2d2c 100644
--- a/src/wscutil.h
+++ b/src/wscutil.h
@@ -20,6 +20,8 @@
*
*/
+#include "src/defs.h"
+
struct iovec;
/* Wi-Fi Simple Configuration Technical Specification v2.0.5, Section 12 */
@@ -330,7 +332,7 @@ static inline unsigned int wsc_attr_iter_get_pos(struct wsc_attr_iter *iter)
}
struct wsc_credential {
- uint8_t ssid[32];
+ uint8_t ssid[SSID_MAX_SIZE];
uint8_t ssid_len;
uint16_t auth_type;
uint16_t encryption_type;
diff --git a/unit/test-util.c b/unit/test-util.c
index 3c143cd7958a..0bfd1587c008 100644
--- a/unit/test-util.c
+++ b/unit/test-util.c
@@ -31,11 +31,12 @@
#include <arpa/inet.h>
#include <ell/ell.h>
+#include "src/defs.h"
#include "src/util.h"
struct ssid_test_data {
size_t len;
- uint8_t ssid[32];
+ uint8_t ssid[SSID_MAX_SIZE];
const char *string;
bool result;
};
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] monitor: Don't dump survey results with noscan
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
@ 2024-08-23 16:18 ` Denis Kenzior
2024-08-23 16:18 ` [PATCH 3/5] monitor: Don't skip genl control Done,Error messages Denis Kenzior
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2024-08-23 16:18 UTC (permalink / raw)
To: iwd; +Cc: Denis Kenzior
Survey is used after each scan, creating quite a bit of spam. Silence
survey results if noscan is set.
---
monitor/nlmon.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 214246ea72c2..f0ffff90b1d7 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -7254,8 +7254,10 @@ static void print_message(struct nlmon *nlmon, const struct timeval *tv,
if (nlmon->nowiphy && (cmd == NL80211_CMD_NEW_WIPHY))
return;
- if (nlmon->noscan && ((cmd == NL80211_CMD_NEW_SCAN_RESULTS) ||
- (cmd == NL80211_CMD_TRIGGER_SCAN)))
+ if (nlmon->noscan && L_IN_SET(cmd, NL80211_CMD_NEW_SCAN_RESULTS,
+ NL80211_CMD_NEW_SURVEY_RESULTS,
+ NL80211_CMD_TRIGGER_SCAN,
+ NL80211_CMD_GET_SURVEY))
return;
switch (type) {
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] monitor: Don't skip genl control Done,Error messages
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
2024-08-23 16:18 ` [PATCH 2/5] monitor: Don't dump survey results with noscan Denis Kenzior
@ 2024-08-23 16:18 ` Denis Kenzior
2024-08-23 16:18 ` [PATCH 4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH Denis Kenzior
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2024-08-23 16:18 UTC (permalink / raw)
To: iwd; +Cc: Denis Kenzior
---
monitor/nlmon.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index f0ffff90b1d7..f7b0f9a14aa6 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -8312,7 +8312,8 @@ void nlmon_print_genl(struct nlmon *nlmon, const struct timeval *tv,
continue;
}
- if (!nlmon->read && nlmsg->nlmsg_type != nlmon->id)
+ if (nlmsg->nlmsg_type >= NLMSG_MIN_TYPE && !nlmon->read &&
+ nlmsg->nlmsg_type != nlmon->id)
continue;
nlmon_message(nlmon, tv, nlmsg);
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
2024-08-23 16:18 ` [PATCH 2/5] monitor: Don't dump survey results with noscan Denis Kenzior
2024-08-23 16:18 ` [PATCH 3/5] monitor: Don't skip genl control Done,Error messages Denis Kenzior
@ 2024-08-23 16:18 ` Denis Kenzior
2024-08-23 16:18 ` [PATCH 5/5] nl80211util: Add builder for CMD_EXTERNAL_AUTH Denis Kenzior
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2024-08-23 16:18 UTC (permalink / raw)
To: iwd; +Cc: Denis Kenzior
---
src/nl80211util.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/nl80211util.c b/src/nl80211util.c
index eaf9f610fc5f..c1218c21fcd2 100644
--- a/src/nl80211util.c
+++ b/src/nl80211util.c
@@ -132,6 +132,14 @@ static bool extract_iovec(const void *data, uint16_t len, void *o)
return true;
}
+static bool extract_ssid(const void *data, uint16_t len, void *o)
+{
+ if (!len || len > SSID_MAX_SIZE)
+ return false;
+
+ return extract_iovec(data, len, o);
+}
+
static bool extract_nested(const void *data, uint16_t len, void *o)
{
const struct l_genl_attr *outer = data;
@@ -170,6 +178,7 @@ static attr_handler handler_for_nl80211(int type)
case NL80211_ATTR_REG_ALPHA2:
return extract_2_chars;
case NL80211_ATTR_MAC:
+ case NL80211_ATTR_BSSID:
return extract_mac;
case NL80211_ATTR_ACK:
return extract_flag;
@@ -179,9 +188,13 @@ static attr_handler handler_for_nl80211(int type)
case NL80211_ATTR_CHANNEL_WIDTH:
case NL80211_ATTR_CENTER_FREQ1:
case NL80211_ATTR_CENTER_FREQ2:
+ case NL80211_ATTR_AKM_SUITES:
+ case NL80211_ATTR_EXTERNAL_AUTH_ACTION:
return extract_uint32;
case NL80211_ATTR_FRAME:
return extract_iovec;
+ case NL80211_ATTR_SSID:
+ return extract_ssid;
case NL80211_ATTR_WIPHY_BANDS:
case NL80211_ATTR_SURVEY_INFO:
case NL80211_ATTR_KEY:
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] nl80211util: Add builder for CMD_EXTERNAL_AUTH
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
` (2 preceding siblings ...)
2024-08-23 16:18 ` [PATCH 4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH Denis Kenzior
@ 2024-08-23 16:18 ` Denis Kenzior
2024-08-23 17:21 ` [PATCH 1/5] defs: Add defs.h to hold certain global definitions James Prestwood
2024-08-23 17:24 ` Denis Kenzior
5 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2024-08-23 16:18 UTC (permalink / raw)
To: iwd; +Cc: Denis Kenzior
This is for sending status from the STA to the driver
---
src/nl80211util.c | 15 +++++++++++++++
src/nl80211util.h | 5 +++++
2 files changed, 20 insertions(+)
diff --git a/src/nl80211util.c b/src/nl80211util.c
index c1218c21fcd2..fcf70b9f1740 100644
--- a/src/nl80211util.c
+++ b/src/nl80211util.c
@@ -654,6 +654,21 @@ struct l_genl_msg *nl80211_build_cmd_frame(uint32_t ifindex,
return msg;
}
+struct l_genl_msg *nl80211_build_external_auth(uint32_t ifindex,
+ uint16_t status_code,
+ const uint8_t *ssid, size_t ssid_len,
+ const uint8_t bssid[static 6])
+{
+ struct l_genl_msg *msg = l_genl_msg_new(NL80211_CMD_EXTERNAL_AUTH);
+
+ l_genl_msg_append_attr(msg, NL80211_ATTR_IFINDEX, 4, &ifindex);
+ l_genl_msg_append_attr(msg, NL80211_ATTR_STATUS_CODE, 2, &status_code);
+ l_genl_msg_append_attr(msg, NL80211_ATTR_SSID, ssid_len, ssid);
+ l_genl_msg_append_attr(msg, NL80211_ATTR_BSSID, 6, bssid);
+
+ return msg;
+}
+
int nl80211_parse_chandef(struct l_genl_msg *msg, struct band_chandef *out)
{
struct band_chandef t;
diff --git a/src/nl80211util.h b/src/nl80211util.h
index d966e04978c9..67fd7d7bdaa6 100644
--- a/src/nl80211util.h
+++ b/src/nl80211util.h
@@ -87,6 +87,11 @@ struct l_genl_msg *nl80211_build_cmd_frame(uint32_t ifindex,
struct iovec *iov,
size_t iov_len);
+struct l_genl_msg *nl80211_build_external_auth(uint32_t ifindex,
+ uint16_t status_code,
+ const uint8_t *ssid, size_t ssid_len,
+ const uint8_t bssid[static 6]);
+
int nl80211_parse_chandef(struct l_genl_msg *msg, struct band_chandef *out);
int nl80211_parse_supported_frequencies(struct l_genl_attr *band_freqs,
struct scan_freq_set *supported_list,
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/5] defs: Add defs.h to hold certain global definitions
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
` (3 preceding siblings ...)
2024-08-23 16:18 ` [PATCH 5/5] nl80211util: Add builder for CMD_EXTERNAL_AUTH Denis Kenzior
@ 2024-08-23 17:21 ` James Prestwood
2024-08-23 17:24 ` Denis Kenzior
5 siblings, 0 replies; 7+ messages in thread
From: James Prestwood @ 2024-08-23 17:21 UTC (permalink / raw)
To: Denis Kenzior, iwd
Hi Denis,
On 8/23/24 9:18 AM, Denis Kenzior wrote:
> This will help to get rid of magic number use throughout the project.
> The definitions should be limited to global magic numbers that are used
> throughout the project, for example SSID length, MAC address length,
> etc.
> ---
> Makefile.am | 3 ++-
> src/ap.c | 8 ++++----
> src/crypto.c | 3 ++-
> src/defs.h | 13 +++++++++++++
> src/dpp-util.h | 5 ++++-
> src/eap-wsc.c | 4 ++--
> src/handshake.h | 2 +-
> src/ie.c | 2 +-
> src/ie.h | 3 ++-
> src/knownnetworks.h | 4 +++-
> src/network.c | 2 +-
> src/p2putil.h | 3 ++-
> src/rrm.c | 4 ++--
> src/scan.c | 2 +-
> src/scan.h | 4 +++-
> src/station.c | 4 ++--
> src/storage.c | 3 ++-
> src/util.c | 5 +++--
> src/wsc.h | 2 +-
> src/wscutil.c | 2 +-
> src/wscutil.h | 4 +++-
> unit/test-util.c | 3 ++-
> 22 files changed, 57 insertions(+), 28 deletions(-)
> create mode 100644 src/defs.h
>
All 5 look good.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/5] defs: Add defs.h to hold certain global definitions
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
` (4 preceding siblings ...)
2024-08-23 17:21 ` [PATCH 1/5] defs: Add defs.h to hold certain global definitions James Prestwood
@ 2024-08-23 17:24 ` Denis Kenzior
5 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2024-08-23 17:24 UTC (permalink / raw)
To: iwd
On 8/23/24 11:18 AM, Denis Kenzior wrote:
> This will help to get rid of magic number use throughout the project.
> The definitions should be limited to global magic numbers that are used
> throughout the project, for example SSID length, MAC address length,
> etc.
> ---
> Makefile.am | 3 ++-
> src/ap.c | 8 ++++----
> src/crypto.c | 3 ++-
> src/defs.h | 13 +++++++++++++
> src/dpp-util.h | 5 ++++-
> src/eap-wsc.c | 4 ++--
> src/handshake.h | 2 +-
> src/ie.c | 2 +-
> src/ie.h | 3 ++-
> src/knownnetworks.h | 4 +++-
> src/network.c | 2 +-
> src/p2putil.h | 3 ++-
> src/rrm.c | 4 ++--
> src/scan.c | 2 +-
> src/scan.h | 4 +++-
> src/station.c | 4 ++--
> src/storage.c | 3 ++-
> src/util.c | 5 +++--
> src/wsc.h | 2 +-
> src/wscutil.c | 2 +-
> src/wscutil.h | 4 +++-
> unit/test-util.c | 3 ++-
> 22 files changed, 57 insertions(+), 28 deletions(-)
> create mode 100644 src/defs.h
>
All applied
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-23 17:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
2024-08-23 16:18 ` [PATCH 2/5] monitor: Don't dump survey results with noscan Denis Kenzior
2024-08-23 16:18 ` [PATCH 3/5] monitor: Don't skip genl control Done,Error messages Denis Kenzior
2024-08-23 16:18 ` [PATCH 4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH Denis Kenzior
2024-08-23 16:18 ` [PATCH 5/5] nl80211util: Add builder for CMD_EXTERNAL_AUTH Denis Kenzior
2024-08-23 17:21 ` [PATCH 1/5] defs: Add defs.h to hold certain global definitions James Prestwood
2024-08-23 17:24 ` Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox