diff src/http/modules/ngx_http_realip_module.c @ 3267:fb4f7605505f

replace inet_addr() with ngx_inet_addr()
author Igor Sysoev <igor@sysoev.ru>
date Mon, 02 Nov 2009 13:51:10 +0000
parents c7d57b539248
children fe71be4a02f1
line wrap: on
line diff
--- a/src/http/modules/ngx_http_realip_module.c
+++ b/src/http/modules/ngx_http_realip_module.c
@@ -226,7 +226,7 @@ found:
 
             ngx_http_set_ctx(r, ctx, ngx_http_realip_module);
 
-            addr = inet_addr((char *) ip);
+            addr = ngx_inet_addr(ip, len);
 
             if (addr == INADDR_NONE) {
                 return NGX_DECLINED;