3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

ap: make APRanges optional

If EnableNetworkConfiguration was enabled ap.c required that
APRanges also be set. This prevents IWD from starting which
effects a perfectly valid station configuration. Instead if
APRanges is not provided IWD still allows ap_init to pass but
DHCP just will not be enabled.
This commit is contained in:
James Prestwood 2020-11-03 11:06:38 -08:00 committed by Denis Kenzior
parent c098db1837
commit acb31477c1

View File

@ -3028,9 +3028,14 @@ static int ap_init(void)
ip_prefix = l_settings_get_string(settings, "General",
"APRanges");
/*
* In this case its assumed the user only cares about station
* netconfig so we let ap_init pass but DHCP will not be
* enabled.
*/
if (!ip_prefix) {
l_error("[General].APRanges must be set for DHCP");
return -EINVAL;
l_warn("[General].APRanges must be set for DHCP");
return 0;
}
if (!ip_pool_create(ip_prefix))