X-Git-Url: http://git.rot13.org/?p=nginx.git;a=blobdiff_plain;f=nginx%2Fsrc%2Fhttp%2Fmodules%2Fngx_http_realip_module.c;h=58bdeeb37eb80d034e17ae52cd2cd5fd4ba0ac9c;hp=44c74a182ff1765c662d3a13f44d1377e33d9b37;hb=refs%2Ftags%2Fnginx;hpb=b9838be4675dbc0f555e860602de1f96310812ff diff --git a/nginx/src/http/modules/ngx_http_realip_module.c b/nginx/src/http/modules/ngx_http_realip_module.c index 44c74a1..58bdeeb 100644 --- a/nginx/src/http/modules/ngx_http_realip_module.c +++ b/nginx/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;