mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
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.
This commit is contained in:
parent
2ba0ad212e
commit
14290e0b9a
@ -413,7 +413,7 @@ mdns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
goto check_config;
|
goto route_priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mdns && mdns_global) {
|
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)) {
|
if (!l_netconfig_check_config(netconfig->nc)) {
|
||||||
l_error("netconfig: Invalid configuration");
|
l_error("netconfig: Invalid configuration");
|
||||||
success = false;
|
success = false;
|
||||||
@ -734,9 +737,6 @@ struct netconfig *netconfig_new(uint32_t ifindex)
|
|||||||
l_icmp6_client_set_debug(icmp6, do_debug, "[ICMPv6] ", NULL);
|
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;
|
return netconfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user