1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

fix byte ordering when using CIDR notation in hosts allow/deny; spotted by Eloy Paris

(This used to be commit 6155144b9f)
This commit is contained in:
Gerald Carter
2003-04-18 14:55:43 +00:00
parent e54b9d59d6
commit 6bbedbdb5a

View File

@ -40,6 +40,10 @@ static BOOL masked_match(const char *tok, const char *slash, const char *s)
DEBUG(0,("access: bad net/mask access control: %s\n", tok));
return (False);
}
/* convert to network byte order */
mask = htonl(mask);
return ((addr & mask) == net);
}