[openwrt/openwrt] base-files: ipcalc.sh: fix awk regex syntax

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 7 12:09:39 PST 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/67d2a7ef9ed7f70a962264167527b383ad637303

commit 67d2a7ef9ed7f70a962264167527b383ad637303
Author: Leon M. George <leon at georgemail.eu>
AuthorDate: Fri Oct 14 14:09:34 2022 +0200

    base-files: ipcalc.sh: fix awk regex syntax
    
    It worked fine before but gawk warns about it.
    
    Signed-off-by: Leon M. George <leon at georgemail.eu>
---
 package/base-files/files/bin/ipcalc.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh
index 99269fff06..56854b4104 100755
--- a/package/base-files/files/bin/ipcalc.sh
+++ b/package/base-files/files/bin/ipcalc.sh
@@ -11,7 +11,7 @@ function bitcount(c) {
 
 function ip2int(ip) {
 	ret=0
-	n=split(ip,a,"\.")
+	n=split(ip,a,"\\.")
 	for (x=1;x<=n;x++)
 		ret=or(lshift(ret,8),a[x])
 	return ret




More information about the lede-commits mailing list