1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

Improve IPv4 detection.

Jeremy.
This commit is contained in:
Jeremy Allison 2007-10-16 16:01:13 -07:00
parent 0ffdf4fdee
commit 2ef50e325c

View File

@ -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)) {