projects
/
nginx.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
upstream nginx-0.7.36
[nginx.git]
/
nginx
/
src
/
http
/
modules
/
ngx_http_access_module.c
diff --git
a/nginx/src/http/modules/ngx_http_access_module.c
b/nginx/src/http/modules/ngx_http_access_module.c
index
12f0b99
..
8cd2e0e
100644
(file)
--- a/
nginx/src/http/modules/ngx_http_access_module.c
+++ b/
nginx/src/http/modules/ngx_http_access_module.c
@@
-9,8
+9,6
@@
#include <ngx_http.h>
#include <ngx_http.h>
-/* AF_INET only */
-
typedef struct {
in_addr_t mask;
in_addr_t addr;
typedef struct {
in_addr_t mask;
in_addr_t addr;
@@
-103,6
+101,10
@@
ngx_http_access_handler(ngx_http_request_t *r)
/* AF_INET only */
/* AF_INET only */
+ if (r->connection->sockaddr->sa_family != AF_INET) {
+ return NGX_DECLINED;
+ }
+
sin = (struct sockaddr_in *) r->connection->sockaddr;
rule = alcf->rules->elts;
sin = (struct sockaddr_in *) r->connection->sockaddr;
rule = alcf->rules->elts;