From: Mike Baker Date: Fri, 24 Mar 2006 14:21:48 +0000 (+0000) Subject: fix ipcalc output X-Git-Tag: whiterussian_rc5~13 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=76d8d0cad0c5733b352238b132e028a1493ab833;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix ipcalc output SVN-Revision: 3473 --- diff --git a/openwrt/package/base-files/default/usr/lib/common.awk b/openwrt/package/base-files/default/usr/lib/common.awk index 250a70f641..a9ab0f1645 100644 --- a/openwrt/package/base-files/default/usr/lib/common.awk +++ b/openwrt/package/base-files/default/usr/lib/common.awk @@ -58,9 +58,9 @@ function ip2int(ip) { return ret } -function int2ip(ip,ret) { +function int2ip(ip,ret,x) { ret=and(ip,255) ip=rshift(ip,8) - for(;ip;ret=and(ip,255)"."ret,ip=rshift(ip,8)); + for(x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++) return ret }