fix CIDR hosts allow/deny notation
authorGerald Carter <jerry@samba.org>
Fri, 28 Mar 2003 15:42:36 +0000 (15:42 +0000)
committerGerald Carter <jerry@samba.org>
Fri, 28 Mar 2003 15:42:36 +0000 (15:42 +0000)
source/lib/access.c

index 50efdcc5f04222cfa7f225dfd60c2b579c48f720..09676dbd58ae4a553d73501a3bd3c0c6fb434d98 100644 (file)
@@ -33,7 +33,7 @@ static BOOL masked_match(const char *tok, const char *slash, const char *s)
         if (strlen(slash + 1) > 2) {
                 mask = interpret_addr(slash + 1);
         } else {
-               mask = (uint32)((ALLONES << atoi(slash + 1)) ^ ALLONES);
+               mask = (uint32)((ALLONES >> atoi(slash + 1)) ^ ALLONES);
         }
 
        if (net == INADDR_NONE || mask == INADDR_NONE) {