Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

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

Open
westbywest opened this issue Jun 21, 2018 · 3 comments
Open

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

westbywest opened this issue Jun 21, 2018 · 3 comments

Comments

@westbywest
Copy link

ip2=$(expr $ip2 % 32 + 96)

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
Copy link
Member

Nice catch. Mind doing up a PR?

@Protagonistics
Copy link
Contributor

@westbywest Can you make a PR?

@westbywest
Copy link
Author

Soon (tm)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants