diff options
Diffstat (limited to 'src/http/modules/ngx_http_realip_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_realip_module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c index ed9c5f9e8..b15954759 100644 --- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -230,7 +230,8 @@ ngx_http_realip_set_addr(ngx_http_request_t *r, ngx_addr_t *addr) c = r->connection; - len = ngx_sock_ntop(addr->sockaddr, text, NGX_SOCKADDR_STRLEN, 0); + len = ngx_sock_ntop(addr->sockaddr, addr->socklen, text, + NGX_SOCKADDR_STRLEN, 0); if (len == 0) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } |
