comparison src/stream/ngx_stream_core_module.c @ 8786:d514f88053e5 quic

Merged with the default branch.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 28 May 2021 13:33:08 +0300
parents 279ad36f2f4b 2ab7b55ae4a0
children 630ecd703805
comparison
equal deleted inserted replaced
8785:e6c26cb4d38b 8786:d514f88053e5
616 ls->rcvbuf = -1; 616 ls->rcvbuf = -1;
617 ls->sndbuf = -1; 617 ls->sndbuf = -1;
618 ls->type = SOCK_STREAM; 618 ls->type = SOCK_STREAM;
619 ls->ctx = cf->ctx; 619 ls->ctx = cf->ctx;
620 620
621 #if (NGX_HAVE_TCP_FASTOPEN)
622 ls->fastopen = -1;
623 #endif
624
621 #if (NGX_HAVE_INET6) 625 #if (NGX_HAVE_INET6)
622 ls->ipv6only = 1; 626 ls->ipv6only = 1;
623 #endif 627 #endif
624 628
625 backlog = 0; 629 backlog = 0;
635 639
636 if (ngx_strcmp(value[i].data, "bind") == 0) { 640 if (ngx_strcmp(value[i].data, "bind") == 0) {
637 ls->bind = 1; 641 ls->bind = 1;
638 continue; 642 continue;
639 } 643 }
644
645 #if (NGX_HAVE_TCP_FASTOPEN)
646 if (ngx_strncmp(value[i].data, "fastopen=", 9) == 0) {
647 ls->fastopen = ngx_atoi(value[i].data + 9, value[i].len - 9);
648 ls->bind = 1;
649
650 if (ls->fastopen == NGX_ERROR) {
651 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
652 "invalid fastopen \"%V\"", &value[i]);
653 return NGX_CONF_ERROR;
654 }
655
656 continue;
657 }
658 #endif
640 659
641 if (ngx_strncmp(value[i].data, "backlog=", 8) == 0) { 660 if (ngx_strncmp(value[i].data, "backlog=", 8) == 0) {
642 ls->backlog = ngx_atoi(value[i].data + 8, value[i].len - 8); 661 ls->backlog = ngx_atoi(value[i].data + 8, value[i].len - 8);
643 ls->bind = 1; 662 ls->bind = 1;
644 663
889 } 908 }
890 909
891 if (ls->proxy_protocol) { 910 if (ls->proxy_protocol) {
892 return "\"proxy_protocol\" parameter is incompatible with \"udp\""; 911 return "\"proxy_protocol\" parameter is incompatible with \"udp\"";
893 } 912 }
913
914 #if (NGX_HAVE_TCP_FASTOPEN)
915 if (ls->fastopen != -1) {
916 return "\"fastopen\" parameter is incompatible with \"udp\"";
917 }
918 #endif
894 } 919 }
895 920
896 als = cmcf->listen.elts; 921 als = cmcf->listen.elts;
897 922
898 for (n = 0; n < u.naddrs; n++) { 923 for (n = 0; n < u.naddrs; n++) {