Skip to content

Commit 6041c4a

Browse files
committed
Issue 747: Ipv6 whitelisting
Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
1 parent 7193a6b commit 6041c4a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/config/global-config.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,7 @@ int Read_Global(XML_NODE node, void *configp, void *mailp)
374374
/* Windows do not need it */
375375
#ifndef WIN32
376376

377-
const char *ip_address_regex =
378-
"^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}/?"
379-
"([0-9]{0,2}|[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})$";
380-
381-
if (Config && OS_PRegex(node[i]->content, ip_address_regex)) {
377+
if (Config && OS_IsValidIP(node[i]->content, NULL)) {
382378
allow_size++;
383379
Config->allow_list = (os_ip **)
384380
realloc(Config->allow_list, sizeof(os_ip *)*allow_size);

0 commit comments

Comments
 (0)