troglobit / netcalc

Simplified clone of sipcalc with ipcalc looks
BSD 3-Clause "New" or "Revised" License
67 stars 12 forks source link

Add tests for addresses just past each private IPv4 address space #19

Closed phil-davis closed 7 years ago

phil-davis commented 7 years ago

192.168.0.0/16 is the class C private space, but 192.169.0.0 and onwards (to 192.175 I think) was also being reported as private address space - which is not so. Fixed up the source code by simplifying it. I am not sure why it ever had the more complex "&" test of the 2nd byte anyway.

troglobit commented 7 years ago

Great work, as always. Thanks!