From 057f07117d83d6ae074c9a3f3cfe54664c789368 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Thu, 26 Feb 2015 20:04:31 +0100 Subject: [PATCH] Fix CIDR prefix calculation --- src/sockets/address-arithmetic.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sockets/address-arithmetic.lisp b/src/sockets/address-arithmetic.lisp index e7b63e1..dc02e05 100644 --- a/src/sockets/address-arithmetic.lisp +++ b/src/sockets/address-arithmetic.lisp @@ -74,7 +74,7 @@ host part of ADDRESS.") &key address netmask) (check-type address ipv4-address "an Ipv4 address") (check-type netmask ipv4-address "an Ipv4 netmask") - (setf (cidr-of network) (cidr-subnet-zeroes netmask)) + (setf (cidr-of network) (- 32 (cidr-subnet-zeroes netmask))) (setf (netmask-of network) netmask) (setf (address-of network) (inet-address-network-portion address netmask))) -- 2.11.4.GIT