Improve IPv4 detection.
authorJeremy Allison <jra@samba.org>
Tue, 16 Oct 2007 23:01:13 +0000 (16:01 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 16 Oct 2007 23:01:13 +0000 (16:01 -0700)
Jeremy.

source/lib/access.c

index 506f93abfc9b55a87ad11b76d7b707efccfa46b3..0d477116ed44b046b00cbd5c26611d12f36f098d 100644 (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)) {