comparison src/http/modules/ngx_http_access_module.c @ 2512:2e91aecb9e57

a prelimiary IPv6 support, HTTP listen
author Igor Sysoev <igor@sysoev.ru>
date Sat, 21 Feb 2009 07:02:02 +0000
parents 2300ab9b069e
children a472d954c534
comparison
equal deleted inserted replaced
2511:f91c5c964e61 2512:2e91aecb9e57
6 6
7 #include <ngx_config.h> 7 #include <ngx_config.h>
8 #include <ngx_core.h> 8 #include <ngx_core.h>
9 #include <ngx_http.h> 9 #include <ngx_http.h>
10 10
11
12 /* AF_INET only */
13 11
14 typedef struct { 12 typedef struct {
15 in_addr_t mask; 13 in_addr_t mask;
16 in_addr_t addr; 14 in_addr_t addr;
17 ngx_uint_t deny; /* unsigned deny:1; */ 15 ngx_uint_t deny; /* unsigned deny:1; */
101 return NGX_DECLINED; 99 return NGX_DECLINED;
102 } 100 }
103 101
104 /* AF_INET only */ 102 /* AF_INET only */
105 103
104 if (r->connection->sockaddr->sa_family != AF_INET) {
105 return NGX_DECLINED;
106 }
107
106 sin = (struct sockaddr_in *) r->connection->sockaddr; 108 sin = (struct sockaddr_in *) r->connection->sockaddr;
107 109
108 rule = alcf->rules->elts; 110 rule = alcf->rules->elts;
109 for (i = 0; i < alcf->rules->nelts; i++) { 111 for (i = 0; i < alcf->rules->nelts; i++) {
110 112