eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 7bc553e47002496cc47978414f5bbd8ce695adce
parent 06eb3bbf6a556ea0c3eb1c928d133346f1d1853b
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Thu,  2 May 2019 12:55:21 +0200

manager: Add use_default_if setting

If the setting is true we'll not attempt to remove or create
interfaces on any wiphys and will only use the default interface
(if it exists).  If false, force us managing the interfaces.  Both
values override the auto logic.

Diffstat:
Msrc/manager.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/manager.c b/src/manager.c @@ -379,6 +379,8 @@ static struct wiphy_setup_state *manager_rx_cmd_new_wiphy( struct l_genl_attr attr; uint32_t id; const char *name; + bool use_default; + const struct l_settings *settings = iwd_get_config(); if (!l_genl_attr_init(&attr, msg)) return NULL; @@ -425,6 +427,14 @@ static struct wiphy_setup_state *manager_rx_cmd_new_wiphy( if (whitelist_filter || blacklist_filter) state->use_default = true; + /* The setting overrides our attempts to ensure things work */ + if (l_settings_get_bool(settings, "General", + "use_default_interface", &use_default)) + state->use_default = use_default; + + if (state->use_default) + l_info("Wiphy %s will only use the default interface", name); + done: wiphy_update_from_genl(wiphy, msg); return state;