commit acb31477c1d575f17c511d5bfbc42b66d706eadf
parent c098db18372e6b986ab5e6476cb63b5bcd307aa0
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 3 Nov 2020 11:06:38 -0800
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.
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/ap.c b/src/ap.c
@@ -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))