[PATCH 1/2] module: Fix variable names
by Andrew Zaborowski
Apparently the intention was for the dependent module's name to appear
in the variable name resulting from using IWD_MODULE_DEPENDS, so the
dependencies all have unique names (apparently not critical).
---
src/module.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/module.h b/src/module.h
index b0102cba..c0f1c6c1 100644
--- a/src/module.h
+++ b/src/module.h
@@ -40,7 +40,7 @@ struct iwd_module_depends {
#define IWD_MODULE_DEPENDS(name, dep) \
static struct iwd_module_depends \
- __iwd_module__##name_##dep \
+ __iwd_module__##name##_##dep \
__attribute__((used, section("__iwd_module_dep"), \
aligned(8))) = { \
.self = #name, \
--
2.20.1
2 years, 6 months
[PATCH v2] peap: Adjust V0 not to close tunnel on Success of Phase2
by Tim Kourt
Despite that PEAPv0 spec indicates that TLS tunnel needs to be torn
down after the transmission of a secure Result response, some servers
treat this TLS close alert as a failure. This patch changes the above
behavior to explicitly torn the tunnel only in the case of
authentication failure and leave it open after the success.
---
src/eap-peap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/eap-peap.c b/src/eap-peap.c
index c8949ca2..16ab0319 100644
--- a/src/eap-peap.c
+++ b/src/eap-peap.c
@@ -182,14 +182,14 @@ static void eap_extensions_handle_request(struct eap_state *eap,
eap_peap_phase2_send_response(response, sizeof(response), eap);
- eap_tls_common_tunnel_close(eap);
-
eap_discard_success_and_failure(eap, false);
eap_tls_common_set_completed(eap);
if (r != EAP_EXTENSIONS_RESULT_SUCCCESS) {
eap_tls_common_set_phase2_failed(eap);
+ eap_tls_common_tunnel_close(eap);
+
return;
}
--
v2: Add description
2.13.6
2 years, 6 months
[PATCH 1/2] peap: Adjust V0 not to close tunnel on Success of Phase2
by Tim Kourt
---
src/eap-peap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/eap-peap.c b/src/eap-peap.c
index c8949ca2..16ab0319 100644
--- a/src/eap-peap.c
+++ b/src/eap-peap.c
@@ -182,14 +182,14 @@ static void eap_extensions_handle_request(struct eap_state *eap,
eap_peap_phase2_send_response(response, sizeof(response), eap);
- eap_tls_common_tunnel_close(eap);
-
eap_discard_success_and_failure(eap, false);
eap_tls_common_set_completed(eap);
if (r != EAP_EXTENSIONS_RESULT_SUCCCESS) {
eap_tls_common_set_phase2_failed(eap);
+ eap_tls_common_tunnel_close(eap);
+
return;
}
--
2.13.6
2 years, 6 months
[PATCH 1/4] scan: Improve comment
by Tim Kourt
---
src/scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scan.c b/src/scan.c
index f2332545..4bc95afe 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -297,8 +297,8 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc,
ext_capa = wiphy_get_extended_capabilities(sc->wiphy,
NL80211_IFTYPE_STATION);
/*
- * XXX: If adding IE's here ensure that ordering is not broken for
- * probe requests (IEEE-2016 Table 9-33).
+ * If adding IE's here ensure that ordering is not broken for
+ * probe requests (IEEE Std 802.11-2016 Table 9-33).
*/
/* Order 9 - Extended Capabilities */
iov[iov_elems].iov_base = (void *) ext_capa;
--
2.21.0
2 years, 6 months
[PATCH 1/5] client: Extend client proxy object's API
by Tim Kourt
Add Start/Stop operations to the client proxy objects. The framework
invokes these operations right after the proxy objects are created
or just before the are destroyed, so proxy objects can perform the
needed actions like start/stop a service, etc. if they choose to
implement these ops.
---
client/dbus-proxy.c | 16 ++++++++++++++++
client/dbus-proxy.h | 2 ++
2 files changed, 18 insertions(+)
diff --git a/client/dbus-proxy.c b/client/dbus-proxy.c
index 26c0511d..eb9812f7 100644
--- a/client/dbus-proxy.c
+++ b/client/dbus-proxy.c
@@ -555,6 +555,19 @@ static void proxy_interface_create(const char *path,
}
l_queue_push_tail(proxy_interfaces, proxy);
+
+ if (!interface_type->ops || !interface_type->ops->start)
+ continue;
+
+ if (interface_type->ops->start(proxy))
+ continue;
+
+ if (!command_is_interactive_mode())
+ command_set_exit_status(EXIT_FAILURE);
+
+ l_main_quit();
+
+ return;
}
}
@@ -562,6 +575,9 @@ static void proxy_interface_destroy(void *data)
{
struct proxy_interface *proxy = data;
+ if (proxy->type->ops && proxy->type->ops->stop)
+ proxy->type->ops->stop(proxy);
+
l_free(proxy->path);
if (proxy->type->ops && proxy->type->ops->destroy)
diff --git a/client/dbus-proxy.h b/client/dbus-proxy.h
index a3304848..e6b6f8c0 100644
--- a/client/dbus-proxy.h
+++ b/client/dbus-proxy.h
@@ -50,6 +50,8 @@ struct proxy_interface_property {
struct proxy_interface_type_ops {
void *(*create)(void);
void (*destroy)(void *data);
+ bool (*start)(const struct proxy_interface *proxy);
+ void (*stop)(const struct proxy_interface *proxy);
const char *(*identity)(void *data);
void (*display)(const char *margin, const void *data);
};
--
2.13.6
2 years, 6 months
[PATCH] manpage: Add route prioritization setting
by Tim Kourt
---
src/iwd.config.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/iwd.config.rst b/src/iwd.config.rst
index 56f019f6..dd04909c 100644
--- a/src/iwd.config.rst
+++ b/src/iwd.config.rst
@@ -170,6 +170,14 @@ The group ``[Network]`` contains network configuration related settings.
If not specified, ``systemd`` is used as default.
+ * - RoutePriorityOffset
+ - Values: uint32 value (default: **300**)
+
+ Configures a route priority offset used by the system to prioritize
+ the default routes. The route with lower priority offset is preferred.
+
+ If not specified, ``300`` is used as default.
+
Blacklist
---------
--
2.13.6
2 years, 6 months
[PATCH] fix doc iwd.network - correct section name is Settings
by Martin/Geno
---
src/iwd.network.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/iwd.network.rst b/src/iwd.network.rst
index 6c882353..756addf3 100644
--- a/src/iwd.network.rst
+++ b/src/iwd.network.rst
@@ -92,7 +92,7 @@ following the group definition.
General Settings
----------------
-The group ``[General]`` contains general settings.
+The group ``[Settings]`` contains general settings.
.. list-table::
:header-rows: 0
@@ -269,7 +269,7 @@ Open Network (Hidden)
.. code-block::
- [General]
+ [Settings]
Hidden=true
Pre-Shared Key (PSK)
--
2.24.0
2 years, 6 months
[PATCH v5 1/3] wiphy: add beacon bits to RM Enabled Capabilities
by James Prestwood
This tells AP's that we support Passive, Active, and Table beacon
measurements.
---
src/wiphy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/wiphy.c b/src/wiphy.c
index ef22c0d3..eb0dfcc9 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -1037,6 +1037,8 @@ static void wiphy_setup_rm_enabled_capabilities(struct wiphy *wiphy)
wiphy->rm_enabled_capabilities[0] = IE_TYPE_RM_ENABLED_CAPABILITIES;
wiphy->rm_enabled_capabilities[1] = 5;
+ /* Bits: Passive (4), Active (5), and Beacon Table (6) capabilities */
+ wiphy->rm_enabled_capabilities[2] = 0x70;
/*
* TODO: Support at least Link Measurement if TX_POWER_INSERTION is
--
2.17.1
2 years, 6 months
[PATCH 1/2] util: add util_is_field_bit_set
by James Prestwood
This lets you easily check if a bit is set in a field of bytes. This was
added as a new API rather than modifiying util_is_bit_set since its still
useful to check if a bit is set in a single byte.
The drive here is that we have many places doing e.g.
if (util_bit_is_set(data[3], 4))
...
To check the 28th bit in a field (in this example). This makes the code
hard to read since you have to do math (3 * 8 + 4) to figure out what bit
is actually being checked in the overall field.
---
src/util.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/util.h b/src/util.h
index dfd1c847..e1230714 100644
--- a/src/util.h
+++ b/src/util.h
@@ -54,6 +54,13 @@ static inline bool util_is_bit_set(const uint8_t oct, int bit)
return oct & mask ? true : false;
}
+static inline bool util_is_field_bit_set(const uint8_t *field, int bit)
+{
+ uint8_t oct = field[bit / 8];
+
+ return util_is_bit_set(oct, bit % 8);
+}
+
static inline bool util_mem_is_zero(const uint8_t *field, size_t size)
{
size_t i;
--
2.17.1
2 years, 6 months