Klaus Demo nginx / 89601c0
fix segfault if no rules are defined, introduced in r3279 Igor Sysoev 10 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
112112
113113 #if (NGX_HAVE_INET6)
114114
115 if (r->connection->sockaddr->sa_family == AF_INET6) {
115 if (alcf->rules6 && r->connection->sockaddr->sa_family == AF_INET6) {
116116 u_char *p;
117117 in_addr_t addr;
118118 struct sockaddr_in6 *sin6;
133133
134134 #endif
135135
136 if (r->connection->sockaddr->sa_family == AF_INET) {
136 if (alcf->rules && r->connection->sockaddr->sa_family == AF_INET) {
137137 sin = (struct sockaddr_in *) r->connection->sockaddr;
138138 return ngx_http_access_inet(r, alcf, sin->sin_addr.s_addr);
139139 }