You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jan Kaluža <jk...@redhat.com> on 2016/02/25 13:12:52 UTC

[PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Hi,

the IP_FREEBIND option allows binding to an IP address that is nonlocal 
or does not (yet) exist.

This is useful, for example, for daemons integration with systemd [1]. 
When daemon wants to bind to particular IP address during system start, 
there is no way how to determine that the network interface is really 
configured and the IP address is available.

Patch in the PR58725 adds support for IP_FREEBIND to APR.

As I said in the bug, I'm not sure if we need to change also win32/os2 
implementation of apr_socket_opt_set - more opinions are welcome.

Could you please review that patch and write me your thoughts?

[1] https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
[2] https://bz.apache.org/bugzilla/show_bug.cgi?id=58725

Regards,
Jan Kaluza

Re: [PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Mar 3, 2016 at 4:52 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
> Sources written for 1.5.3 would no longer be source compatible with 1.5.2,
> so this is a change for 1.6.0.

I see, thanks for clarifying.

Re: [PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
Sources written for 1.5.3 would no longer be source compatible with 1.5.2,
so this is a change for 1.6.0.

I've seen no objection to apr_cstr (another we cannot backport to 1.5.x),
so I'll backport that this morning and get us a little closer to being ready
to tag and release 1.6.0.

Bill

On Thu, Mar 3, 2016 at 9:47 AM, Yann Ylavic <yl...@gmail.com> wrote:

> On Thu, Mar 3, 2016 at 1:17 PM, Joe Orton <jo...@redhat.com> wrote:
> >
> > q for the list: Does APR normally avoid adding new API-ish things in
> > stable branches or can I add this to 1.5.x too?
>
> I think a new #define which has negligeable chances to collide with
> any existing one is only "patch level" (per Bill quoting), no?
>

Re: [PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Mar 3, 2016 at 1:17 PM, Joe Orton <jo...@redhat.com> wrote:
>
> q for the list: Does APR normally avoid adding new API-ish things in
> stable branches or can I add this to 1.5.x too?

I think a new #define which has negligeable chances to collide with
any existing one is only "patch level" (per Bill quoting), no?

Re: [PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Posted by Joe Orton <jo...@redhat.com>.
On Thu, Mar 03, 2016 at 09:41:17AM -0600, William A Rowe Jr wrote:
> >From http://apr.apache.org/versioning.html...
> 
> "Versions are denoted using a standard triplet of integers:
> *MAJOR.MINOR.PATCH*. The basic intent is that *MAJOR* versions are
> incompatible, large-scale upgrades of the API. *MINOR* versions retain
> source and binary compatibility with older minor versions, and changes in
> the *PATCH* level are perfectly compatible, forwards and backwards."

Ah, right.  Thanks Bill!

Regards, Joe

Re: [PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
>From http://apr.apache.org/versioning.html...

"Versions are denoted using a standard triplet of integers:
*MAJOR.MINOR.PATCH*. The basic intent is that *MAJOR* versions are
incompatible, large-scale upgrades of the API. *MINOR* versions retain
source and binary compatibility with older minor versions, and changes in
the *PATCH* level are perfectly compatible, forwards and backwards."

On Thu, Mar 3, 2016 at 6:17 AM, Joe Orton <jo...@redhat.com> wrote:

> On Thu, Feb 25, 2016 at 01:12:52PM +0100, Jan Kaluza wrote:
> >
> > This is useful, for example, for daemons integration with systemd [1].
> When
> > daemon wants to bind to particular IP address during system start, there
> is
> > no way how to determine that the network interface is really configured
> and
> > the IP address is available.
> >
> > Patch in the PR58725 adds support for IP_FREEBIND to APR.
>
> There is at least a FreeBSD variant of the same, so it seems worth
> putting in APR.  Thanks & done in trunk & 1.6.x, though I tweaked the
> name to APR_SO_FREEBIND.
>
> q for the list: Does APR normally avoid adding new API-ish things in
> stable branches or can I add this to 1.5.x too?
>
> Regards, Joe
>

Re: [PATCH] Add support for IP_FREEBIND sockopt (PR58725)

Posted by Joe Orton <jo...@redhat.com>.
On Thu, Feb 25, 2016 at 01:12:52PM +0100, Jan Kaluza wrote:
> 
> This is useful, for example, for daemons integration with systemd [1]. When
> daemon wants to bind to particular IP address during system start, there is
> no way how to determine that the network interface is really configured and
> the IP address is available.
> 
> Patch in the PR58725 adds support for IP_FREEBIND to APR.

There is at least a FreeBSD variant of the same, so it seems worth 
putting in APR.  Thanks & done in trunk & 1.6.x, though I tweaked the 
name to APR_SO_FREEBIND.

q for the list: Does APR normally avoid adding new API-ish things in 
stable branches or can I add this to 1.5.x too?

Regards, Joe