httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William A Rowe Jr <wr...@rowe-clan.net>
Subject Re: [PATCH] Add "FreeListen" to support IP_FREEBIND
Date Tue, 08 Mar 2016 02:06:46 GMT
On Mar 7, 2016 13:54, "Jan Kaluža" <jkaluza@redhat.com> wrote:
>
> On 03/07/2016 04:17 PM, Jim Jagielski wrote:
>>
>> Intstead of adding YAD (yet another directive ;) ), would it
>> be possible to somehow leverage Listen itself, maybe with some
>> sort of flag?
>
>
> Yes, that would be quite possible. I was thinking about that way, but I
have chosen YAD as a first approach. If you think adding flag to Listen is
better way, I can rework my patch.
>
> Regards,
> Jan Kaluza
>
>
>>> On Mar 7, 2016, at 6:41 AM, Jan Kaluža <jkaluza@redhat.com> wrote:
>>>
>>> Hi,
>>>
>>> attached patch adds new "FreeListen" directive. The difference between
"Listen" and "FreeListen" is that "FreeListen" sets the IP_FREEBIND socket
option on platforms where this is available.
>>>
>>> It is therefore possible to start the server even when particular IP
address set in the "FreeListen" is not configured yet.
>>>
>>> This is needed for httpd startup with systemd when one wants to use
particular IP address to bind. There is no way how to start httpd after the
IP address has been configured in systemd and according to systemd
developers, the applications should become more robust to handle network
changes like that. The full reasoning is explained here [1].
>>>
>>> The patch needs latest APR-trunk currently, but it could be rewritten
to set IP_FREEBIND directly instead of using APR API (We use that way for
REUSEADDR socket option).
>>>
>>> Do you think FreeListen is good name for this feature, or would you
name/implement it differently?
>>>
>>> [1] https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
>>>
>>> Regards,
>>> Jan Kaluza
>>> <httpd-trunk-freelisten.patch>

Reviewing the behavior, an unadorned new directive makes more sense to me
than cluttering Listen, which already takes one optional protocol behavior
argument.

The same handler can process both directives.

Mime
View raw message