#20987: Number precision of busybox awk is too low for x86-kvm_guest
-------------------------+------------------------
 Reporter:  yousong      |      Owner:  developers
     Type:  defect       |     Status:  new
 Priority:  high         |  Milestone:
Component:  base system  |    Version:  Trunk
 Keywords:               |
-------------------------+------------------------
 It looks like the busybox awk is broken for `x86-kvm_guest` in that it can
 not even handle 32 bit integers arithmetic properly.  It's bad because
 `ipcalc.sh` depends on it and we need it to generate configs for
 `dnsmasq`.

 Here are the related output in `kvm_guest`.

 {{{
 root@OpenWrt:/# ipcalc.sh 192.168.1.1 24 100 149
 IP=0.0.0.1
 NETMASK=0.0.0.255
 BROADCAST=0.0.0.255
 NETWORK=0.0.0.1
 PREFIX=24
 START=0.0.0.101
 END=0.0.0.250
 root@OpenWrt:/# echo | awk -e 'END { v=3232235776; print v "," lshift(v,8)
 }'
 3.23224e+09,0
 }}}

 Expected output from an `ar71xx` target

 {{{
 root@OpenWrt:~# ipcalc.sh 192.168.1.1 24 100 149
 IP=192.168.1.1
 NETMASK=255.255.255.0
 BROADCAST=192.168.1.255
 NETWORK=192.168.1.0
 PREFIX=24
 START=192.168.1.100
 END=192.168.1.249
 root@OpenWrt:~# echo | awk -e 'END { v=3232235776; print v "," lshift(v,8)
 }'
 3232235776,2818637824
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/20987>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to