ipcalc icon indicating copy to clipboard operation
ipcalc copied to clipboard

truncated network names are not correctly handled

Open nresare opened this issue 9 years ago • 0 comments

for example the nestat -nr command on OSX outputs truncated network names where for example 10.255/20 is considered to be equivalent of 10.255.0.0/20. For ipcalc these are not treated equally:

>>> n = ipcalc.Network("10.255/20")
>>> n.host_first(), n.host_last()
(IP('10.0.0.1'), IP('10.0.15.254'))

>>> n = ipcalc.Network("10.255.0.0/20")
>>> n.host_first(), n.host_last()
(IP('10.255.0.1'), IP('10.255.15.254'))
(python-env)date:~ noa$ pip list |grep ipcalc
ipcalc (1.1.3)

nresare avatar Nov 10 '15 14:11 nresare