aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_access_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-02-21 07:02:02 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-02-21 07:02:02 +0000
commita35eaccdec4788e8fb9a883b26fc7c4dcfe1d8f8 (patch)
treeb42648c4cb4eb2cb4a1e585ed7870ede0f551600 /src/http/modules/ngx_http_access_module.c
parenta883361c47c4fa1abf35fe2497e2bb74d9299e3e (diff)
downloadnginx-a35eaccdec4788e8fb9a883b26fc7c4dcfe1d8f8.tar.gz
nginx-a35eaccdec4788e8fb9a883b26fc7c4dcfe1d8f8.zip
a prelimiary IPv6 support, HTTP listen
Diffstat (limited to 'src/http/modules/ngx_http_access_module.c')
-rw-r--r--src/http/modules/ngx_http_access_module.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_access_module.c b/src/http/modules/ngx_http_access_module.c
index 12f0b9922..8cd2e0e13 100644
--- a/src/http/modules/ngx_http_access_module.c
+++ b/src/http/modules/ngx_http_access_module.c
@@ -9,8 +9,6 @@
#include <ngx_http.h>
-/* AF_INET only */
-
typedef struct {
in_addr_t mask;
in_addr_t addr;
@@ -103,6 +101,10 @@ ngx_http_access_handler(ngx_http_request_t *r)
/* AF_INET only */
+ if (r->connection->sockaddr->sa_family != AF_INET) {
+ return NGX_DECLINED;
+ }
+
sin = (struct sockaddr_in *) r->connection->sockaddr;
rule = alcf->rules->elts;