diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-02-21 07:02:02 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-02-21 07:02:02 +0000 |
commit | a35eaccdec4788e8fb9a883b26fc7c4dcfe1d8f8 (patch) | |
tree | b42648c4cb4eb2cb4a1e585ed7870ede0f551600 /src/http/modules/ngx_http_realip_module.c | |
parent | a883361c47c4fa1abf35fe2497e2bb74d9299e3e (diff) | |
download | nginx-a35eaccdec4788e8fb9a883b26fc7c4dcfe1d8f8.tar.gz nginx-a35eaccdec4788e8fb9a883b26fc7c4dcfe1d8f8.zip |
a prelimiary IPv6 support, HTTP listen
Diffstat (limited to 'src/http/modules/ngx_http_realip_module.c')
-rw-r--r-- | src/http/modules/ngx_http_realip_module.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c index 44c74a182..58bdeeb37 100644 --- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -14,8 +14,6 @@ #define NGX_HTTP_REALIP_HEADER 2 -/* AF_INET only */ - typedef struct { in_addr_t mask; in_addr_t addr; @@ -209,6 +207,10 @@ found: /* AF_INET only */ + if (r->connection->sockaddr->sa_family != AF_INET) { + return NGX_DECLINED; + } + sin = (struct sockaddr_in *) c->sockaddr; from = rlcf->from->elts; |