diff options
| author | Joe Orton <jorton@apache.org> | 2020-04-23 08:26:26 +0000 |
|---|---|---|
| committer | Joe Orton <jorton@apache.org> | 2020-04-23 08:26:26 +0000 |
| commit | a42f3692b1b975ba05a8e678bafe463707e7e5df (patch) | |
| tree | a8a5e9dbdd39f78248454ba5de524a230f3a3436 /include | |
| parent | 48aa76e1fce1a670b68a5dc288b2d8d7a96aa237 (diff) | |
| download | httpd-a42f3692b1b975ba05a8e678bafe463707e7e5df.tar.gz | |
Add optional options= argument to Listen to add listener-specific
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 #114
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876865 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
| -rw-r--r-- | include/ap_listen.h | 10 | ||||
| -rw-r--r-- | include/ap_mmn.h | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/include/ap_listen.h b/include/ap_listen.h index 9cbaaa4910..2329cae70c 100644 --- a/include/ap_listen.h +++ b/include/ap_listen.h @@ -38,6 +38,11 @@ typedef struct ap_slave_t ap_slave_t; typedef struct ap_listen_rec ap_listen_rec; typedef apr_status_t (*accept_function)(void **csd, ap_listen_rec *lr, apr_pool_t *ptrans); +/* Flags for ap_listen_rec.flags */ +#define AP_LISTEN_SPECIFIC_ERRORS (0x0001) +#define AP_LISTEN_FREEBIND (0x0002) +#define AP_LISTEN_REUSEPORT (0x0004) + /** * @brief Apache's listeners record. * @@ -73,10 +78,9 @@ struct ap_listen_rec { ap_slave_t *slave; /** - * Allow the accept_func to return a wider set of return codes + * Various AP_LISTEN_* flags. */ - int use_specific_errors; - + apr_uint32_t flags; }; /** diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 24ac648ac9..1271ce18ed 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -628,14 +628,15 @@ * 20200331.2 (2.5.1-dev) Add ap_proxy_should_override to mod_proxy.h * 20200331.3 (2.5.1-dev) Add ap_parse_request_line() and * ap_check_request_header() + * 20200420.0 (2.5.1-dev) Add flags to listen_rec in place of use_specific_errors */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20200331 +#define MODULE_MAGIC_NUMBER_MAJOR 20200420 #endif -#define MODULE_MAGIC_NUMBER_MINOR 3 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a |
