allow 0.0.0.0/0 syntax in hosts allow/deny

patch from Charles Levert <charles@comm.polymtl.ca>
This commit is contained in:
Andrew Tridgell
2000-08-19 13:04:29 +00:00
parent 9ec16c83be
commit 43e46b4cf6

View File

@@ -68,6 +68,7 @@ static int match_address(char *addr, char *tok)
mask = ntohl(mask);
} else {
int bits = atoi(p+1);
if (bits == 0) return 1;
if (bits <= 0 || bits > 32) {
rprintf(FERROR,"malformed mask in %s\n", tok);
return 0;