Created
August 28, 2015 03:17
-
-
Save cvsync/f1d4affa9a5e8f08829d to your computer and use it in GitHub Desktop.
IPv6 アドレスを除外したいなら?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- mod_dosdetector.c.orig 2015-08-28 12:06:01.000000000 +0900 | |
+++ mod_dosdetector.c 2015-08-28 12:07:32.000000000 +0900 | |
@@ -307,6 +307,11 @@ | |
#endif | |
} | |
if(cfg->forwarded || addr.s_addr == 0){ | |
+ struct in6_addr addr6; | |
+ if (inet_pton(AF_INET6, address, &addr6) == 1) { | |
+ /* *VALID* IPv6 address */ | |
+ return DECLINED; | |
+ } | |
if (inet_aton(address, &addr) == 0) { | |
TRACELOG("dosdetector: '%s' is not a valid IP addresss", address); | |
return DECLINED; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment