Fix for prefixlengths of 32 (IPv4) and 128 (IPv6) bits.
This commit is contained in:
parent
627f7c22b4
commit
a1bd878e11
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: netutl.c,v 1.12.4.40 2002/06/21 10:11:12 guus Exp $
|
$Id: netutl.c,v 1.12.4.41 2002/06/21 17:49:48 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -241,7 +241,7 @@ cp
|
||||||
i = masklen / 8;
|
i = masklen / 8;
|
||||||
masklen %= 8;
|
masklen %= 8;
|
||||||
|
|
||||||
if(a[i++] & (0xff >> masklen))
|
if(masklen && a[i++] & (0xff >> masklen))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for(; i < len; i++)
|
for(; i < len; i++)
|
||||||
|
|
Loading…
Reference in a new issue