pittmesh / ip-calculator

A browser-based calculator for determining PittMesh IP addresses
http://www.pittmesh.net/ipcalc
1 stars 0 forks source link

modulo order of operations error in mm-mac2ipv4.sh #29

Open westbywest opened 6 years ago

westbywest commented 6 years ago

https://github.com/pittmesh/ip-calculator/blob/954e2e39cce62a66f687337f42e0d82a8725f6f9/mm-mac2ipv4.sh#L90 The javascript ipcalc script computes this as arr[0] %= 32 + 96; To have the same order of operations, shell script usage would have to be ip2=$(expr $ip2 % $(expr 32 + 96))

colindean commented 6 years ago

Nice catch. Mind doing up a PR?

Protagonistics commented 6 years ago

@westbywest Can you make a PR?

westbywest commented 6 years ago

Soon (tm)