Re: svn commit: r1927885 - in httpd/httpd/trunk: include server

Yann Ylavic <[email protected]>
Newsgroups gmane.comp.apache.devel
Message-ID <CAKQ1sVN__8hxCsSRR-7iCnV_61rKKdEzcJ0MRN17VoQ_W15VzQ@mail.gmail.com>
On Tue, Aug 19, 2025 at 2:45 PM <[email protected]> wrote:
>
> Author: rpluem
> Date: Tue Aug 19 12:45:15 2025
> New Revision: 1927885
>
> Log:
> Make the value set for the socket option TCP_DEFER_ACCEPT configurable
>
> * include/ap_listen.h:
>   - Add prototype for include/ap_listen.heraccept
>   - Wire in new directive ListenTCPDeferAccept
>
> * include/mpm_common.h:
>   Define the previous static value as default value via DEFAULT_TCP_DEFER_ACCEPT
>
> * server/listen.c:
>   - Add static int ap_listentcpdeferaccept
>   - ap_apply_accept_filter: Use value of ap_listenbacklog for setting TCP_DEFER_ACCEPT
>   - ap_listen_pre_config: Set default value
>   - Add ap_set_listentcpdeferaccept
>
> Modified:
>    httpd/httpd/trunk/include/ap_listen.h
>    httpd/httpd/trunk/include/mpm_common.h
>    httpd/httpd/trunk/server/listen.c
[]
> --- httpd/httpd/trunk/server/listen.c   Tue Aug 19 12:45:02 2025        (r1927884)
> +++ httpd/httpd/trunk/server/listen.c   Tue Aug 19 12:45:15 2025        (r1927885)
[]
> @@ -287,7 +288,7 @@ static void ap_apply_accept_filter(apr_p
>                            accf);
>          }
>  #else
> -        rv = apr_socket_opt_set(s, APR_TCP_DEFER_ACCEPT, 30);
> +        rv = apr_socket_opt_set(s, APR_TCP_DEFER_ACCEPT, ap_listenbacklog);

Should this use ap_listentcpdeferaccept rather than ap_listenbacklog?

>          if (rv != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(rv)) {
>              ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p, APLOGNO(00076)
>                                "Failed to enable APR_TCP_DEFER_ACCEPT");


Cheers;
Yann.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.