diff options
author | Gerald Carter <jerry@samba.org> | 2003-04-26 16:18:20 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-04-26 16:18:20 +0000 |
commit | ce9af4e049608038a4acb056271f0799741bf61d (patch) | |
tree | e4eac62b618a1718029d265f443424c2ceca4502 | |
parent | 38c0f29c9e1d5b1268ccf3e606775d9d293cc7ac (diff) | |
download | samba-ce9af4e049608038a4acb056271f0799741bf61d.tar.gz samba-ce9af4e049608038a4acb056271f0799741bf61d.tar.bz2 samba-ce9af4e049608038a4acb056271f0799741bf61d.zip |
round three of CIDR fixes; spotted by Tomoki AONO
(This used to be commit 554026b2084e2371c1ddae7316fbb0b9b76472d4)
-rw-r--r-- | source3/lib/access.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c index 9d07893c2f..c30b3c33cc 100644 --- a/source3/lib/access.c +++ b/source3/lib/access.c @@ -34,6 +34,8 @@ static BOOL masked_match(const char *tok, const char *slash, const char *s) mask = interpret_addr(slash + 1); } else { mask = (uint32)((ALLONES >> atoi(slash + 1)) ^ ALLONES); + /* convert to network byte order */ + mask = htonl(mask); } if (net == INADDR_NONE || mask == INADDR_NONE) { @@ -41,9 +43,6 @@ static BOOL masked_match(const char *tok, const char *slash, const char *s) return (False); } - /* convert to network byte order */ - mask = htonl(mask); - return ((addr & mask) == net); } |