diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-10-15 13:48:54 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-10-15 13:48:54 +0200 |
commit | ec53a1a5ec104f3afca5d83141899f78f618f6e5 (patch) | |
tree | f43f81c4a36de36a8e4e8f761379795e97e1cbd2 | |
parent | b6a22e51809ffaf6fe97f818051df34d9859a5ad (diff) | |
download | ipaddrcheck-ec53a1a5ec104f3afca5d83141899f78f618f6e5.tar.gz ipaddrcheck-ec53a1a5ec104f3afca5d83141899f78f618f6e5.zip |
Revert "T816 ipaddrcheck / libcidr but on IPv6 network validation"
This reverts commit 418d0113a78ba57f525553b9b150d6adeaf38c0a.
-rw-r--r-- | src/ipaddrcheck_functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipaddrcheck_functions.c b/src/ipaddrcheck_functions.c index 2ce7e52..82d01f9 100644 --- a/src/ipaddrcheck_functions.c +++ b/src/ipaddrcheck_functions.c @@ -101,7 +101,7 @@ int is_ipv6_cidr(char* address_str) const char *error; int erroffset; - re = pcre_compile("^(((?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}(?:[0-9]{1,3}\.){3}[0-9]{1,3}$)(([0-9A-F]{1,4}:){0,5}|:)((:[0-9A-F]{1,4}){1,5}:|:)|::(?:[A-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}$)(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}:|:(:[A-F0-9]{1,4}){7}))(\\/\\d{1,3}))$", + re = pcre_compile("^((([0-9a-fA-F\\:])+)(\\/\\d{1,3}))$", 0, &error, &erroffset, NULL); rc = pcre_exec(re, NULL, address_str, strlen(address_str), 0, 0, offsets, 1); @@ -128,7 +128,7 @@ int is_ipv6_single(char* address_str) const char *error; int erroffset; - re = pcre_compile("^(?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}(?:[0-9]{1,3}\.){3}[0-9]{1,3}$)(([0-9A-F]{1,4}:){0,5}|:)((:[0-9A-F]{1,4}){1,5}:|:)|::(?:[A-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}$)(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}:|:(:[A-F0-9]{1,4}){7})$", + re = pcre_compile("^(([0-9a-fA-F\\:])+)$", 0, &error, &erroffset, NULL); rc = pcre_exec(re, NULL, address_str, strlen(address_str), 0, 0, offsets, 1); |