From 2b2168bff6ae50954334fa1e391e022e9986841d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Oct 2007 16:01:13 -0700 Subject: Improve IPv4 detection. Jeremy. (This used to be commit 2ef50e325c2183385286b994216624dc3a309ff3) --- source3/lib/access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/access.c') 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)) { -- cgit