diff src/http/modules/ngx_http_access_module.c @ 2202:2300ab9b069e

*) refactor ngx_ptocidr() *) allow address without bitmask *) thus now ngx_http_geo_module accepts addresses without bitmask
author Igor Sysoev <igor@sysoev.ru>
date Tue, 26 Aug 2008 14:19:37 +0000
parents ba9e6e57f65d
children 2e91aecb9e57
line wrap: on
line diff
--- a/src/http/modules/ngx_http_access_module.c
+++ b/src/http/modules/ngx_http_access_module.c
@@ -166,14 +166,6 @@ ngx_http_access_rule(ngx_conf_t *cf, ngx
         return NGX_CONF_OK;
     }
 
-    rule->addr = inet_addr((char *) value[1].data);
-
-    if (rule->addr != INADDR_NONE) {
-        rule->mask = 0xffffffff;
-
-        return NGX_CONF_OK;
-    }
-
     rc = ngx_ptocidr(&value[1], &in_cidr);
 
     if (rc == NGX_ERROR) {