calrissian / mango

Common utilities for rapid application development
Apache License 2.0
17 stars 7 forks source link

Fix bug in CIDR parsing code. #212

Closed willmurnane closed 6 years ago

willmurnane commented 6 years ago

See also https://www.ipaddressguide.com/cidr to test. Essentially, the existing code keeps the wrong number of bits, but because the test cases only had netmask % 8 == 4, it was missed.

eawagner commented 6 years ago

Good catch