summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-16 16:01:13 -0700
committerJeremy Allison <jra@samba.org>2007-10-16 16:01:13 -0700
commit2b2168bff6ae50954334fa1e391e022e9986841d (patch)
tree912d760f792166d19a24d37a89a2362b9826f171
parentcadb72dd997a7e3284a3df93a717a4c1920cf24e (diff)
downloadsamba-2b2168bff6ae50954334fa1e391e022e9986841d.tar.gz
samba-2b2168bff6ae50954334fa1e391e022e9986841d.tar.bz2
samba-2b2168bff6ae50954334fa1e391e022e9986841d.zip
Improve IPv4 detection.
Jeremy. (This used to be commit 2ef50e325c2183385286b994216624dc3a309ff3)
-rw-r--r--source3/lib/access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c
index 506f93abfc..0d477116ed 100644
--- a/source3/lib/access.c
+++ b/source3/lib/access.c
@@ -144,7 +144,7 @@ static bool string_match(const char *tok,const char *s)
return true;
}
} else if ((cut = strchr_m(tok, '/')) != 0) { /* netnumber/netmask */
- if (isdigit(s[0]) ||
+ if ((isdigit(s[0]) && strchr_m(tok, '.') != NULL) ||
(tok[0] == '[' && cut > tok && cut[-1] == ']') ||
((isxdigit(s[0]) || s[0] == ':') &&
strchr_m(tok, ':') != NULL)) {