comparison src/core/ngx_connection.c @ 554:2b9e388c61f1 NGINX_0_8_23

nginx 0.8.23 *) Security: now SSL/TLS renegotiation is disabled. Thanks to Maxim Dounin. *) Bugfix: listen unix domain socket did not inherit while online upgrade. *) Bugfix: the "unix:" parameter of the "set_real_ip_from" directive did not without yet another directive with any IP address. *) Bugfix: segmentation fault and infinite looping in resolver. *) Bugfix: in resolver. Thanks to Artem Bokhan.
author Igor Sysoev <http://sysoev.ru>
date Wed, 11 Nov 2009 00:00:00 +0300
parents c04fa65fe604
children 43e02819c5cf
comparison
equal deleted inserted replaced
553:8da5668048b4 554:2b9e388c61f1
115 switch (ls[i].sockaddr->sa_family) { 115 switch (ls[i].sockaddr->sa_family) {
116 116
117 #if (NGX_HAVE_INET6) 117 #if (NGX_HAVE_INET6)
118 case AF_INET6: 118 case AF_INET6:
119 ls[i].addr_text_max_len = NGX_INET6_ADDRSTRLEN; 119 ls[i].addr_text_max_len = NGX_INET6_ADDRSTRLEN;
120 len = NGX_INET6_ADDRSTRLEN + sizeof(":65535") - 1;
121 break;
122 #endif
123
124 #if (NGX_HAVE_UNIX_DOMAIN)
125 case AF_UNIX:
126 ls[i].addr_text_max_len = NGX_UNIX_ADDRSTRLEN;
127 len = NGX_UNIX_ADDRSTRLEN;
120 break; 128 break;
121 #endif 129 #endif
122 130
123 case AF_INET: 131 case AF_INET:
124 ls[i].addr_text_max_len = NGX_INET_ADDRSTRLEN; 132 ls[i].addr_text_max_len = NGX_INET_ADDRSTRLEN;
133 len = NGX_INET_ADDRSTRLEN + sizeof(":65535") - 1;
125 break; 134 break;
126 135
127 default: 136 default:
128 ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno, 137 ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno,
129 "the inherited socket #%d has " 138 "the inherited socket #%d has "
130 "an unsupported protocol family", ls[i].fd); 139 "an unsupported protocol family", ls[i].fd);
131 ls[i].ignore = 1; 140 ls[i].ignore = 1;
132 continue; 141 continue;
133 } 142 }
134
135 len = ls[i].addr_text_max_len + sizeof(":65535") - 1;
136 143
137 ls[i].addr_text.data = ngx_pnalloc(cycle->pool, len); 144 ls[i].addr_text.data = ngx_pnalloc(cycle->pool, len);
138 if (ls[i].addr_text.data == NULL) { 145 if (ls[i].addr_text.data == NULL) {
139 return NGX_ERROR; 146 return NGX_ERROR;
140 } 147 }