[openwrt/openwrt] base-files: treat 'ipaddr is inside range' as warning again

LEDE Commits lede-commits at lists.infradead.org
Thu May 29 14:56:08 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/32ed3db1a0c36aeecd027ee585669ab0a390ac22

commit 32ed3db1a0c36aeecd027ee585669ab0a390ac22
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Wed Apr 30 12:25:01 2025 +0200

    base-files: treat 'ipaddr is inside range' as warning again
    
    The call to 'ipcalc' is used in 'dnsmasq' init script to create the
    configuration. If the 'ipaddr' is in the configured range then 'ipcalc' exited
    with an error whereby the START/STOP variables are unavailable.
    
    This behaviour has changed during 'ipcalc' refactoring and now leads to a
    problem when starting 'dnsmasq' if the 'ipaddr' is inside this range. To
    restore the old behaviour, only a warning is issued as before and the
    required variables for the 'dnsmasq' are still set.
    
    Fixes: 854739b32c7f (base-files: ipcalc.sh: Rewrite in pure shell)
    
    Signed-off-by: Florian Eckert <fe at dev.tdt.de>
    Link: https://github.com/openwrt/openwrt/pull/18641
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/base-files/files/bin/ipcalc.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh
index 871a49ed6e..e8c7a07df6 100755
--- a/package/base-files/files/bin/ipcalc.sh
+++ b/package/base-files/files/bin/ipcalc.sh
@@ -133,8 +133,7 @@ _ip2str START "$start"
 _ip2str END "$end"
 
 if [ "$start" -le "$ipaddr" ] && [ "$ipaddr" -le "$end" ]; then
-    echo "error: address $IP inside range $START..$END" >&2
-    exit 1
+    echo "warning: address $IP inside range $START..$END" >&2
 fi
 
 echo "START=$START"




More information about the lede-commits mailing list