Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 2562:c352c419be85
ipv6only
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 13 Mar 2009 14:20:34 +0000 |
parents | 8ec97ff12a0a |
children | 47839f59ce2a |
comparison
equal
deleted
inserted
replaced
2561:2c3cff5999a2 | 2562:c352c419be85 |
---|---|
3330 "on this platform, ignored"); | 3330 "on this platform, ignored"); |
3331 #endif | 3331 #endif |
3332 continue; | 3332 continue; |
3333 } | 3333 } |
3334 | 3334 |
3335 if (ngx_strncmp(value[n].data, "ipv6only=o", 10) == 0) { | |
3336 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) | |
3337 struct sockaddr *sa; | |
3338 | |
3339 sa = (struct sockaddr *) ls->sockaddr; | |
3340 | |
3341 if (sa->sa_family == AF_INET6) { | |
3342 | |
3343 if (ngx_strcmp(&value[n].data[10], "n") == 0) { | |
3344 ls->conf.ipv6only = 1; | |
3345 | |
3346 } else if (ngx_strcmp(&value[n].data[10], "ff") == 0) { | |
3347 ls->conf.ipv6only = 2; | |
3348 | |
3349 } else { | |
3350 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
3351 "invalid ipv6only flags \"%s\"", | |
3352 &value[n].data[9]); | |
3353 return NGX_CONF_ERROR; | |
3354 } | |
3355 | |
3356 ls->conf.bind = 1; | |
3357 | |
3358 } else { | |
3359 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
3360 "ipv6only is not supported " | |
3361 "on addr \"%s\", ignored", | |
3362 ls->conf.addr); | |
3363 } | |
3364 | |
3365 continue; | |
3366 #else | |
3367 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
3368 "bind ipv6only is not supported " | |
3369 "on this platform"); | |
3370 return NGX_CONF_ERROR; | |
3371 #endif | |
3372 } | |
3373 | |
3335 if (ngx_strcmp(value[n].data, "ssl") == 0) { | 3374 if (ngx_strcmp(value[n].data, "ssl") == 0) { |
3336 #if (NGX_HTTP_SSL) | 3375 #if (NGX_HTTP_SSL) |
3337 ls->conf.ssl = 1; | 3376 ls->conf.ssl = 1; |
3338 continue; | 3377 continue; |
3339 #else | 3378 #else |