Three problems in the generated configuration:
- The error message for a missing configuration file prints $file,
which is never set, instead of $val, which holds the path.
- The warning for the unsupported FAS options prints the value of
the option instead of its name, so the message does not say which
option is unsupported.
- gatewayinterface is emitted twice: once resolved to a device via
network_get_device() as "GatewayInterface", and once more by the
generic option loop with the raw UCI value. When the value names a
network section rather than a device, the second line overrides
the resolved device with a name nodogsplash cannot use.
Reported-by: openwrt-ai[bot]
Signed-off-by: Josef Schlehofer <redacted>
Co-authored-by: Claude Fable 5 <redacted>
config_get val "$cfg" config
if [ -n "$val" ]; then
if [ ! -f "$val" ]; then
- echo "Configuration file '$file' doesn't exist." >&2
+ echo "Configuration file '$val' doesn't exist." >&2
return 1
fi
addline "$(cat $val)"
addline "GatewayInterface $ifname"
for option in preauth binauth \
- daemon debuglevel maxclients gatewayname gatewayinterface gatewayiprange \
+ daemon debuglevel maxclients gatewayname gatewayiprange \
gatewayaddress gatewayport webroot splashpage statuspage \
redirecturl sessiontimeout preauthidletimeout authidletimeout checkinterval \
setmss mssvalue trafficcontrol downloadlimit uploadlimit \
for option in fasport fasremoteip faspath fas_secure_enabled ; do
config_get val "$cfg" "$option"
if [ -n "$val" ]; then
- echo "Warning: nodogsplash does not support $val"
+ echo "Warning: nodogsplash does not support $option"
return 1
fi
done