eiwd

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

commit 14290e0b9a4d10940b99b760770ffd83772dd325
parent 2ba0ad212e9ad48aaabf9ca8fc36e0788dbe5aca
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Thu, 22 Dec 2022 03:41:43 +0100

netconfig: Don't load settings in netconfig_new

Move the l_netconfig_set_route_priority() and
l_netconfig_set_optimistic_dad_enabled() calls from netconfig_new, which
is called once for the l_netconfig object's lifetime, to
netconfig_load_settings, which is called before every connection attempt.
This is needed because we clean up the l_netconfig configuration by calling
l_netconfig_reset_config() at different points in connection setup and
teardown so we'd reset the route priority that we've set in netconfig_new,
back to 0 and never reload it.

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

diff --git a/src/netconfig.c b/src/netconfig.c @@ -413,7 +413,7 @@ mdns: } if (!success) - goto check_config; + goto route_priority; } if (!mdns && mdns_global) { @@ -426,7 +426,10 @@ mdns: } } -check_config: +route_priority: + l_netconfig_set_route_priority(netconfig->nc, ROUTE_PRIORITY_OFFSET); + l_netconfig_set_optimistic_dad_enabled(netconfig->nc, true); + if (!l_netconfig_check_config(netconfig->nc)) { l_error("netconfig: Invalid configuration"); success = false; @@ -734,9 +737,6 @@ struct netconfig *netconfig_new(uint32_t ifindex) l_icmp6_client_set_debug(icmp6, do_debug, "[ICMPv6] ", NULL); } - l_netconfig_set_route_priority(netconfig->nc, ROUTE_PRIORITY_OFFSET); - l_netconfig_set_optimistic_dad_enabled(netconfig->nc, true); - return netconfig; }