Apply patch from Paul Hampson <Paul.Hampson@Pobox.Com> to work for a
authorkkalev <kkalev>
Sat, 26 Apr 2003 09:54:34 +0000 (09:54 +0000)
committerkkalev <kkalev>
Sat, 26 Apr 2003 09:54:34 +0000 (09:54 +0000)
netmask of 32

src/modules/rlm_ippool/rlm_ippool.c

index 39f09b4..6ef347a 100644 (file)
@@ -216,8 +216,9 @@ static int ippool_instantiate(CONF_SECTION *conf, void **instance)
                         * Net and Broadcast addresses are excluded
                         */
                        or_result = i | data->netmask;
-                       if (or_result == data->netmask ||
-                           (~or_result == 0)) {
+                       if (~data->netmask != 0 &&
+                               (or_result == data->netmask ||
+                           (~or_result == 0))) {
                                DEBUG("rlm_ippool: IP %s excluded",
                                      ip_ntoa(str, ntohl(i)));
                                continue;