Skip to content

Conversation

@notroj
Copy link
Collaborator

@notroj notroj commented Apr 20, 2020

Add AP_LISTEN_SPECIFIC_ERRORS, AP_LISTEN_FREEBIND as flags.
Add ListenFree directive, setting AP_LISTEN_FREEBIND flag.
Create socket with APR_SO_FREEBIND set if flag used.

Submitted by: jorton, Lubos Uhliarik
PR: 61865

@notroj notroj force-pushed the listenfree branch 2 times, most recently from 58d0cbf to abd7c5b Compare April 21, 2020 11:23
@notroj notroj changed the title Convert ap_listen_rec.use_specific_errors field to flags. Add Listen options inc FREEBIND support Apr 21, 2020
socket options.

Reimplement "use_specific_errors" listener flag under generic
ap_listen_rec flags field to hold both these options.

* include/ap_listen.h: Add AP_LISTEN_* flags.
  (ap_listen_rec): Rename use_specific_errors to flags.

* server/listen.c (make_sock): Set APR_SO_FREEBIND if
  AP_LISTEN_FREEBIND flag is set on listener; set APR_SO_REUSEPORT
  unconditionally if AP_LISTEN_REUSEPORT is set.
  (alloc_listener): Take flags argument.
  (ap_setup_listeners): Set AP_LISTEN_SPECIFIC_ERRORS flag here.
  (ap_set_listener): Parse optional options=... argument, catch
  typos and fail if protocol name contains a "=".
  (ap_duplicate_listeners): Duplicate flags.

Submitted by: jkaluza, Lubos Uhliarik <luhliari redhat.com>, jorton
PR: 61865
@asfgit asfgit closed this in a42f369 Apr 23, 2020
@notroj notroj deleted the listenfree branch April 23, 2020 08:33
notroj added a commit to notroj/httpd that referenced this pull request Jun 23, 2020
socket options.

Reimplement "use_specific_errors" listener flag under generic
ap_listen_rec flags field holding all listener-specific options.

* include/ap_listen.h: Add AP_LISTEN_* flags.
  (ap_listen_rec): Rename use_specific_errors to flags.

* server/listen.c (make_sock): Set APR_SO_FREEBIND if
  AP_LISTEN_FREEBIND flag is set on listener; set APR_SO_REUSEPORT
  unconditionally if AP_LISTEN_REUSEPORT is set.
  (alloc_listener): Take flags argument.
  (ap_setup_listeners): Set AP_LISTEN_SPECIFIC_ERRORS flag here.
  (ap_set_listener): Parse optional options=... argument, catch
  typos and fail if protocol name contains a "=".
  (ap_duplicate_listeners): Duplicate flags.

Submitted by: jkaluza, Lubos Uhliarik <luhliari redhat.com>, jorton
PR: 61865
Github: closes apache#114


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876865 13f79535-47bb-0310-9956-ffa450edef68
@bastien-roucaries
Copy link

@rpluem Will like to have this backported to 2.4

@bastien-roucaries
Copy link

@notroj Will like to have also this for 2.4

@notroj
Copy link
Collaborator Author

notroj commented Aug 17, 2025

@bastien-roucaries If you want to get a commit backported, you can do the work to backport it to 2.4.x (without breaking backwards compatibility) and create a PR and/or post a patch to dev@ for review. I don't think it's very helpful adding comments in PRs asking someone else to do that work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants