Klaus Demo nginx / feda353
Replaced ngx_http_realip_from_t with ngx_in_cidr_t. Ruslan Ermilov 10 years ago
1 changed file(s) with 4 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
1515
1616
1717 typedef struct {
18 in_addr_t mask;
19 in_addr_t addr;
20 } ngx_http_realip_from_t;
21
22
23 typedef struct {
24 ngx_array_t *from; /* array of ngx_http_realip_from_t */
18 ngx_array_t *from; /* array of ngx_in_cidr_t */
2519 ngx_uint_t type;
2620 ngx_uint_t hash;
2721 ngx_str_t header;
113107 ngx_list_part_t *part;
114108 ngx_table_elt_t *header;
115109 struct sockaddr_in *sin;
110 ngx_in_cidr_t *from;
116111 ngx_connection_t *c;
117112 ngx_http_realip_ctx_t *ctx;
118 ngx_http_realip_from_t *from;
119113 ngx_http_realip_loc_conf_t *rlcf;
120114
121115 ctx = ngx_http_get_module_ctx(r, ngx_http_realip_module);
316310 ngx_int_t rc;
317311 ngx_str_t *value;
318312 ngx_cidr_t cidr;
319 ngx_http_realip_from_t *from;
313 ngx_in_cidr_t *from;
320314
321315 value = cf->args->elts;
322316
331325
332326 if (rlcf->from == NULL) {
333327 rlcf->from = ngx_array_create(cf->pool, 2,
334 sizeof(ngx_http_realip_from_t));
328 sizeof(ngx_in_cidr_t));
335329 if (rlcf->from == NULL) {
336330 return NGX_CONF_ERROR;
337331 }