e5c43448cda8c78e3d0cd8683aab2c907cc38362 1635859 |
|
31-Oct-2014 |
rpluem |
* Add missing include for ap_pglobal |
a742cbb3e85669473b3233f30e3978bb6a20083c 1635521 |
|
30-Oct-2014 |
ylavic |
MPMs, core: make duplicated listeners (SO_REUSEPORT) introduced in r1599531
less intrusive.
Submitted by: Yingqi Lu <yingqi.lu@intel.com>
Modified/Committed by: ylavic
Add ListenCoresBucketsRatio which is a configurable ratio between the number of
CPU cores (online) and the number of listeners buckets to create, defaulting to
zero (so that listeners buckets become an opt-in, ie. ncpus / ratio > 1).
This could also be made an opt-out by using the previous hardcoded value (8) as
default.
Make ap_close_listeners() act on all the listeners (including duplicated ones),
since the function is also called externally (eg. mod_cgid, mod_ssl_ct and
possibly any third party module) to cleanup opened descriptors when a process
is forked (the duplicated listeners are kept in a scoped/static variable).
Add ap_close_listeners_ex() to close a single bucket of listeners, used by the
children to close unused duplicates and internally by ap_close_listeners().
Make ap_duplicate_listeners() compute the number of buckets to be used, instead
of each MPM. This number is now based on the above ratio and will not change
unless asked to (given *num_buckets < 1, that is when the MPM does not run in
one-process mode nor after a graceful restart).
Remove some global variables (mpm_listen, enable_default_listeners) previously
used to communicate between MPMs and ap_listen, since ap_duplicate_listeners()
API can now be used to do so.
Also rename num_buckets as ap_num_listen_buckets, and prefix have_so_reuseport
with ap_ (both printed by ap_log_common(), hence kept global).
Detect ap_have_so_reuseport once only at startup.
Restore dummy_connection() as before r1599531 since sending POD signals should
not depend on the number of listeners buckets (there is still one single socket
receiving the connections).
For each MPM (concerned), move the bucket data (pod, listeners and eventually
accept mutex) into a struct and instanciate an array of them (sized by the
number of buckets), for each child to use its own data according to its bucket
index, and the parent to maintain the whole. |
6ec60cdcfc2923e00cb4ab897fcff927b11a36cd 1608744 |
|
08-Jul-2014 |
jkaluza |
* server/listen.c: return -1 in find_systemd_socket on error |
1e070900da1f4da6815b5d7badf5c9cc19d49eda 1608721 |
|
08-Jul-2014 |
trawick |
whitespace changes only |
de9479d1589cb756c9517611d8d193466536107b 1608703 |
|
08-Jul-2014 |
jkaluza |
* server/listen.c: detect systemd socket activation using sd_listen_fds(),
drop the support for "Listen systemd" and use standard Listen syntax instead.
This allows using the same configuration file with or without socket activation
and allows setting protocol when using socket activation. |
fa55eb314c1c74607009630fbdfbc7bc18fce7de 1608694 |
|
08-Jul-2014 |
jkaluza |
Follow up r1608686, pass process to alloc_systemd_listener. |
704d9aa23045b97535ae8861b5ba76b8a43c48f7 1608686 |
|
08-Jul-2014 |
jkaluza |
* server/listen.c: duplicate sockets correctly when using systemd socket
activation, fix addrlen in getsockname() call. |
66646d795dba6fe06b947068f8c8adbe990b6886 1601558 |
|
10-Jun-2014 |
takashi |
follow up r1599531 and r1599593:
C99fix |
018bf3a515632842ac8bd3c5dbb22c0d96f10902 1601281 |
|
09-Jun-2014 |
ylavic |
core: Update empty log tags. |
47985ff6a0ba93c3e25be3829e786bf958510dfd 1599593 |
|
03-Jun-2014 |
jim |
Don't try to assume the value of SO_REUSEPORT... |
3c990331fc6702119e4f5b8ba9eae3021aea5265 1599531 |
|
03-Jun-2014 |
jim |
Optimize w/ duplicated listeners and use of SO_REUSEPORT
where available. |
9591ec71b8911ecefbf6571333ff78fcb6efffa5 1528032 |
|
01-Oct-2013 |
jorton |
* configure.in: Simplify/fix systemd detection: move later to fix
autoconf warnings; define HAVE_SYSTEMD rather than using CPPFLAGS.
* server/listen.c: Use HAVE_SYSTEMD for systemd #define.
* modules/arch/unix/config5.m4: Update systemd headers check. |
77e0c54d01cb01e700e939a78afa49a7aa1e2275 1511033 |
|
06-Aug-2013 |
pquerna |
Add support for systemd socket activation to listener sockets. |
460782121fdf15bf58efba22beb3decb1d089c80 1405407 |
|
03-Nov-2012 |
trawick |
revert r1401448 and add a comment on why there's a bewildering copy
of args passed to apr_socket_accept_filter() |
3c871b0969003614992fce60267826c628a7fc57 1401448 |
|
23-Oct-2012 |
jailletc36 |
No need to apr_pstrdup things here, 'apr_socket_accept_filter' already makes it own copy.
Not compiled nor tested as on my system APR_HAS_SO_ACCEPTFILTER is set to 0. |
17d97722160b111d00f5bece8a6a40fd24aa978d 1304874 |
|
24-Mar-2012 |
sf |
Remove the hack from r806010 that mis-uses the pointer to the per-directory
config for other things. This breaks with MPMs that do have a per-directory
config.
If any module appears that wants to use this functionality, we can
add a new, non-broken API. Since the docs clearly state that ap_set_listener()
should not be called by external modules, I don't consider this an API/ABI
change, but only a bug fix.
PR: 52904 |
185aa71728867671e105178b4c66fbc22b65ae26 1209766 |
|
03-Dec-2011 |
sf |
Add lots of unique tags to error log messages |
d5351a0abd7326b67e6fe72dc082be7e0fb5e486 1209417 |
|
02-Dec-2011 |
jorton |
* server/listen.c (open_listeners): Fix logic error caught by
Coverity; possible NULL pointer deref at startup with a
particular (and unlikely) listener/system config. |
7184de27ec1d62a83c41cdeac0953ca9fd661e8c 1132781 |
|
06-Jun-2011 |
sf |
Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere.
We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect. |
36ef8f77bffe75d1aa327882be1b5bdbe2ff567a 951895 |
|
06-Jun-2010 |
sf |
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels |
28e16aee785efb9f6ebfb30733b823e2a298b50a 932501 |
|
09-Apr-2010 |
trawick |
make_sock() sets lr->listen on success, so no need to set
in the caller |
029cfcadd33649e610c939d106dec96ca7f27bac 806010 |
|
20-Aug-2009 |
niq |
Don't require all listeners to be created equal ... |
dd028aa8111afb6534fece555e8c2d408894671e 757853 |
|
24-Mar-2009 |
trawick |
Introduce a new set of APIs to allow MPMs to be proper modules instead
of integral parts which share global variables, functions, and macros
with the rest of httpd.
Converted now:
prefork, worker, event, simple, WinNT*
*WinNT hasn't been built or tested, and relies on a hack to include the
WinNT mpm.h to disable Unixy MPM support routines in mpm_common.c |
316f1b18d8a0c7ca10a1718cf11934623593156f 731071 |
|
03-Jan-2009 |
wrowe |
revert 730949, accf_map member should never have been or be NULL |
5745b85d2a082c4fb0a141a80c7149468bd5b1d4 730951 |
|
03-Jan-2009 |
rpluem |
* APR_TCP_DEFER_ACCEPT is always defined. So this is pointless. |
2ca30dc90ff1098fd27a67355e1ba2c41097c675 730949 |
|
03-Jan-2009 |
rpluem |
* Handle the case where conf->accf_map is NULL gracefully instead of segfaulting |
bd9d13cd44467315e4941848d7e593bad3a376b9 727477 |
|
17-Dec-2008 |
rederpj |
Set Listen protocol to "https" if port is set to 443 and no proto is specified
(as documented but not implemented). PR 46066 [Dan Poirier <poirier pobox.com>] |
32b0f71b11ab1962084982d9594153321de56166 664535 |
|
08-Jun-2008 |
trawick |
core: Fix address-in-use startup failure on some platforms caused
by attempting to set up an IPv4 listener which overlaps with an
existing IPv6 listener.
The failure occurred on the second pass of the open-logs hook in
a configuration such as the following:
Listen 8080
Listen 0.0.0.0:8081
Listen [::]:8081
During the first pass, the two port 8081 listen recs were
adjacent and existing logic prevented binding to 0.0.0.0:8081.
On the second pass, they were not adjacent and we then tried
to bind to 0.0.0.0:8081, leading to failure on some platforms
(seen on SLES 9 and Ubuntu 7.10, not seen on many other Unix-ish
platforms).
Leave a note about other unhandled configurations. |
d6e81217d873dc3b87fc4ffa5fbac2fad4191a15 645455 |
|
07-Apr-2008 |
pquerna |
Remove all references to CORE_PRIVATE. |
23fff010a9565d40c6b8f852f6662c5151d105bf 501364 |
|
30-Jan-2007 |
jorton |
* server/listen.c (ap_apply_accept_filter): Bump TCP_DEFER_ACCEPT
argument to 30 units-of-unspecified-nature.
Submitted by: Dean Gaudet <dean arctic.org> |
b62c24d5cc5bec29cec95aae8e236016cd78fe3c 487901 |
|
16-Dec-2006 |
niq |
PR#37680: fix socket block/nonblock on restart/graceful
Patch submitted by Darius Davis (darius-abz free-range.com.au) |
da09cb78fe2e87c16e5bbe3fdea15ec9684a1be0 467034 |
|
23-Oct-2006 |
trawick |
Fix address-in-use startup failure caused by corruption of the list of
listen sockets in some configurations with multiple generic Listen
directives.
The logic in error is that which prunes out generic IPv4 listening
sockets when we already have a v4-mapped generic IPv6 listening
socket for the same port. |
842ae4bd224140319ae7feec1872b93dfd491143 420983 |
|
11-Jul-2006 |
fielding |
update license header text |
3d81f57512275ca06a60a9bcbd23c1f8b429fdf2 395228 |
|
19-Apr-2006 |
colm |
Update the copyright year in all .c, .h and .xml files |
e8f95a682820a599fe41b22977010636be5c2717 332306 |
|
10-Nov-2005 |
jim |
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines |
021165b37f4d83ba413b27772bef84962bbb7326 280401 |
|
12-Sep-2005 |
colm |
Remove a call to strerror(). Possibly a leftover from prior debugging code. |
ebc11bf78d8de37cbb92a1b27a1fcbd096395964 265701 |
|
01-Sep-2005 |
jorton |
* server/listen.c (open_listeners): Avoid shadowing the 'next'
variable at function-scope. |
0d5c04826299cc26fb8842416a40ffb71387a9c5 240096 |
|
25-Aug-2005 |
jorton |
* server/listen.c (open_listeners): If 0.0.0.0 is found before [::]
for the same port, switch them so that the bind to [::] is attempted
first.
Submitted by: colm, jorton |
228ff31074b0b763ead96ce28e9e98b4ecc510a8 240092 |
|
25-Aug-2005 |
jorton |
* server/listen.c (IS_INADDR_ANY, IS_IN6ADDR_ANY): New macros.
(open_listeners): Simplify using the new macros; no functional change. |
eeeb16b24dadff55cbfbc6d357a739fe8275c7f4 239732 |
|
24-Aug-2005 |
colm |
Correct the function prototype/declaration |
3366b8d8fbf36b5c1b091d707ed2e3f17f57ba1c 239710 |
|
24-Aug-2005 |
colm |
Provide a function for closing all of the listeners.
* This is useful for properly implementing a graceful stop and restart
where we want child processess to be able to carry on serving a request
but "de-listen" from a port. So that another instance entirely can be
started in our place, or to unbind from a "Listen" directive an admin
has removed from the configuration. |
89211a3153be8b03353c3bfbca45fed67cb80f0b 190563 |
|
14-Jun-2005 |
pquerna |
Merge the listen-protocol sandbox branch to trunk.
I will be adding documentation for the new directives hopefully in the next day or so.
* server/core.c: Added 'Protocol' to the core module config
Added ap_{set,get}_server_protocol API.
Added new directive: 'AcceptFilter'.
Enable 'httpready' by default on systems that support it. Use dataready filters for others.
* server/listen.c: Attempt to inherit protocols from Listener Records to Server configs.
The 'Listen' directive can now optionally take a protocol arg
Move bits that determined which accept filter is applied to core.c.
Added bits to find the correct accept filter based on the core's configuration.
* include/{ap_listen.h,http_core.h}: Add Protocol to respective structures.
* include/http_core.h: Add the accf_map table to the core_server_config structure
* include/ap_mmn.h: Minor MMN Bump for the new interfacces.
* modules/ssl/ssl_engine_init.c: Use the new protocol framework to enable mod_ssl for 'https' websites. |
be22e9735c88e468a7fbdc886d29748fa82a58c5 168411 |
|
05-May-2005 |
pquerna |
* server/listen.c: Remove the unused port parameter from open_listeners, and update the comment to reflect reality. |
275419d6395e6f072962fb701b89accaff1f3690 157583 |
|
15-Mar-2005 |
jerenkrantz |
Add ReceiveBufferSize directive to control the TCP receive buffer.
Submitted by: Eric Covener <covener gmail.com>
Reviewed by: Justin Erenkrantz (with minor formatting tweaks) |
08cb74ca432a8c24e39f17dedce527e6a47b8001 151408 |
|
04-Feb-2005 |
jerenkrantz |
Update copyright year to 2005 and standardize on current copyright owner line. |
5a8bb5948d2a258145174320587706de3219d8a3 111596 |
|
11-Dec-2004 |
pquerna |
* Add bits to use APR_TCP_DEFER_ACCEPT
* Log Warnings when adding defer accept or an accept filter fails. |
df38daceaa0d8d19bb7e23f6e9bcec258466441d 109498 |
|
02-Dec-2004 |
jorton |
Fix gcc "no previous prototype" warnings after reorganisation:
* server/core_filters.c (ap_core_input_filter, ap_core_output_filter,
ap_net_time_filter): Renamed to add ap_ prefixes for global symbols.
* include/ap_listen.h: Don't export ap_listen_open at all, it's not
used outside server/listen.c any more.
* server/listen.c (open_listeners): Renamed from ap_listen_open. |
4b9d04712f3c887072645f9a628888998908467b 106988 |
|
30-Nov-2004 |
jerenkrantz |
Declare the ap_set_listen* functions with AP_DECLARE_NONSTD for Win32 support.
(I think this is what is needed for Win32, but I'm not quite sure.) |
e8fcc872d5caeea36adb6511f9d1ab6ce3fbb5c0 106843 |
|
28-Nov-2004 |
jerenkrantz |
Properly export ap_listen_* functions.
* server/listen.c: Add AP_DECLARE as appropriate.
* include/ap_listen.h: Add AP_DECLARE as appropriate. |
ae0220f581660790b39162cce3a56b61ee145046 103030 |
|
19-Mar-2004 |
trawick |
Fix crash when Apache was started with no Listen directives.
Submitted by: Michael Corcoran <mcorcoran warpsolutions.com>
Reviewed by: Jeff Trawick |
422a2e9e48a594c7d46d62410e45651a7a994430 103029 |
|
19-Mar-2004 |
trawick |
*) SECURITY: CAN-2004-0174 (cve.mitre.org)
Fix starvation issue on listening sockets where a short-lived
connection on a rarely-accessed listening socket will cause a
child to hold the accept mutex and block out new connections until
another connection arrives on that rarely-accessed listening socket.
With Apache 2.x there is no performance concern about enabling the
logic for platforms which don't need it, so it is enabled everywhere
except for Win32. [Jeff Trawick]
(already in 2.0.49, propagating to mirrors now) |
6de8046f8f7e07cd83895a528df25d977e502c76 102619 |
|
09-Feb-2004 |
nd |
fix name of The Apache Software Foundation |
2af7ecf8c1589908aac793c154942d3cb3f6e492 102589 |
|
08-Feb-2004 |
nd |
fix copyright dates according to the first check in |
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dc 102525 |
|
06-Feb-2004 |
nd |
apply Apache License, Version 2.0 |
ced699ca391a4fb7d70cfeb995c58d4bf62f00a8 102495 |
|
04-Feb-2004 |
trawick |
FreeBSD: Use the httpready accept filter instead of dataready on
newer levels of the OS.
Submitted by: Paul Querna <chip force-elite.com>
Reviewed by: Jeff Trawick |
26a4456dd6f1a5d7d7fff766551461a578687c4a 102135 |
|
01-Jan-2004 |
nd |
update license to 2004. |
c1b808d160bfb5c849263be8d4acff600853a328 101991 |
|
05-Dec-2003 |
trawick |
stop using apr_sockaddr_port_get() accessor function, as it will
disappear from APR 1.0 API shortly |
f58fb80a631827ce90b66cdddb910eab770f4500 101338 |
|
28-Sep-2003 |
jwoolley |
Setting lr = NULL on line 399 leads the the loop
closing early (see line 343) and the ap_listeners list being
nonsense.
End result is a segfault if something is already listening on ::
on our port when httpd is started.
Submitted by: Colm MacCarthaigh <colm@stdlib.net> |
1fbf6ba0f5207e6637b49f9a9dfcc779bbe952a9 101154 |
|
03-Sep-2003 |
trawick |
switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore |
a2380900d1fb0890cc2f1d46e2633b47da3f5574 101096 |
|
25-Aug-2003 |
jorton |
* listen.c (ap_listen_open): Avoid casts when checking for :: and
0.0.0.0 to fix build on FreeBSD 4.2, and fix logic.
Reviewed by: Colm MacCarthaigh |
bf56fcc9e4c60c858523147ac34801848a361bda 101083 |
|
25-Aug-2003 |
jerenkrantz |
Fixup IPv6 Listen statements on Linux by attempting to bind in the order
that getaddrinfo() returned to us and skipping binding to IPv4 addresses
if the previous bind was to an IPv6 of the same address and port.
Justin made some style changes, added a (struct in6_addr*) to make it compile
on *BSD as well as an attempt to make the addition of the listener to the list
a little more efficient.
Submitted by: Colm MacCarthaigh <colm@stdlib.net>
Reviewed by: Justin Erenkrantz |
3caed8f01e7d67f3ad5d47cb28bb4e43131652fd 100999 |
|
15-Aug-2003 |
jerenkrantz |
Change Listen directive to bind to all addresses returned by
apr_sockaddr_info_get when a hostname is not specified. |
97fffcccc452cdb4f4f6b81c9d2dda74c6d54b52 100994 |
|
14-Aug-2003 |
jerenkrantz |
More fun with IPv6 Listen statements.
- Remove the default_family declaration as it is no longer used.
- Fix segfault if checking NULL sa->hostname.
- Cycle through the bind_addr list if we get an error creating an IPv6 socket
and we're IPv6 enabled and the binding address is NULL. The odds are that
we just can't support IPv6. (The twist is that apr_sockaddr_info_get should
return bind_addr's for IPv6 and IPv4. This strikes me as slightly more
elegant than the find_default_family hack.)
This should get us working on Linux and Netware again. |
238e707c9022eaa8332a702dd6913dd0d1fb3df8 100978 |
|
13-Aug-2003 |
jerenkrantz |
Correct failure with Listen directives on machines with IPv6 enabled by
removing find_default_family() and letting APR determine what should be done
without a hostname.
This patch requires the corollary APR patch to properly call getaddrinfo().
(Justin modified Colm's patch to always walk the old listeners even when
we have an address. That part of the patch wasn't really relevant.)
Submitted by: Colm MacC�rthaigh <colm@stdlib.net>
Reviewed by: Justin Erenkrantz |
b2421ca2e60283026146dbd9596a958c7b214a60 99130 |
|
31-Mar-2003 |
wrowe |
Quit registering *two* cleanups listening sockets prior to exec.
We open them once, register a cleanup only once.
Submitted by: Jeff Trawick
Reviewed by: FirstBill, OtherBill |
33bdcae1f7a1a65e351dda2a766a0cf28b1e695d 98573 |
|
03-Feb-2003 |
nd |
finished that boring job:
update license to 2003.
Happy New Year! ;-)) |
6bdf767f10f67548501103ae10cc159dcfb2c19f 97595 |
|
22-Nov-2002 |
trawick |
Fix critical bug in new --enable-v4-mapped configure option
implementation which broke IPv4 listening sockets on
systems with IPV6_V6ONLY socket option.
That option should only be done on IPv6 listening sockets.
Submitted by: hiroyuki hanai <hanai@imgsrc.co.jp>]
Reviewed by: Jeff Trawick |
95d00ea81131488769296fa5765ed745cbf45207 97516 |
|
14-Nov-2002 |
trawick |
Add --[enable|disable]-v4-mapped configure option to control
whether or not Apache expects to handle IPv4 connections
on IPv6 listening sockets. Either setting will work on
systems with the IPV6_V6ONLY socket option. --enable-v4-mapped
must be used on systems that always allow IPv4 connections on
IPv6 listening sockets.
Note: As the ssl config file is not automatically generated and
it is expected to require editing anyway to work, the only
change there was to suggest the required Listen statements
in a comment.
PR: PR 14037 (Bugzilla), PR 7492 (Gnats), various dups of these PRs |
35313c8d7368125c3e95d3118238d2be9a613000 96258 |
|
31-Jul-2002 |
trawick |
Restore the ability to specify host names on Listen directives.
We needed to compare on the value we pass to apr_sockaddr_info_get(),
not the IP address string. Sometimes this is an IP address string
and sometimes it is a host name. Otherwise, on the second pass
through this code we won't find the existing listen_rec for a Listen
directive which had a host name, and we'll create a new listen_rec
and try to bind again to the same addr/port.
PR: 11030
Helped immensely by: David Shane Holden <dpejesh@yahoo.com>,
who debugged it and submitted a patch which
showed the problem; a much simpler change was
committed though |
55da18d54a0ba74dc51aecba5b0daf71a2ed10a7 96237 |
|
30-Jul-2002 |
trawick |
When deciding on the default address family for listening sockets,
make sure we can actually bind to an AF_INET6 socket before
deciding that we should default to AF_INET6. This fixes a startup
problem on certain levels of OpenUNIX.
PR: 10235 |
9179fa90e821c964d10f28b97fc6acee776af7cf 96057 |
|
15-Jul-2002 |
wrowe |
http occurances to update for apr_socket_opt_get/set |
faf8593cc6d1c8e598ca434f7e88effa74f19e2f 94566 |
|
09-Apr-2002 |
aaron |
Remove unnecessary includes of apr_lock.h |
e93624301705e3dc68992e3b488a764389eb8b98 94358 |
|
01-Apr-2002 |
trawick |
Don't allow initialization to succeed if we can't get a socket
corresponding to one of the Listen statements. |
524a500c035eb0f53df9849e2c7b87934372b560 94048 |
|
20-Mar-2002 |
wrowe |
Here's the patch that really sucks. old_listeners points to an array
of apr_socket objects already destroyed by their cleanups, and in any
case they now live in invalid memory. Extend their lifetimes.
This implies that the process pool grows on every restart for no good
reason. One possible solution is to let the old pconf survive until
the new pconf is alive. Another is to create the listeners in a subpool
of process->pool, destroyed after the old_listeners are closed.
Either which way, a better solution exists, but this closes the immediate
bug. [How haven't we been segfaulting in unix on restarts before this
patch, gurus?] |
85e4da1cf0dee899551b583b1f06314b2835100a 93924 |
|
14-Mar-2002 |
wrowe |
Our ap_listeners were binding to IIS sockets, other Apache instances'
listeners, the bottoms of peoples' shoes, etc.
Wait to set SO_REUSEADDR on Win32 until the parent is certain the
port is all ours. |
bc8fd1b0b1afdf89b8d28eefa8cd74e26ba97986 93918 |
|
13-Mar-2002 |
fielding |
Update our copyright for this year. |
57b7c64eaa9d7934d51d23c8e23f0b6cf6ce6a8a 93884 |
|
13-Mar-2002 |
trawick |
simplify the way we find the family of an apr_sockaddr_t |
413325aee7400e79c44e2ec0b013d63a12687ed4 93774 |
|
07-Mar-2002 |
striker |
Torch a stale commented out line. |
2261031aa94be82d7e6b1b8c367afc1b282317f5 93717 |
|
05-Mar-2002 |
ianh |
Sander's Stylistic Submission
(de-tab)
PR:
Obtained from:
Submitted by:
Reviewed by: |
ebf4099fd4921bbbcef21dc872b9cd4fc73e9f55 93252 |
|
05-Feb-2002 |
trawick |
restore the SO_REUSEADDR for listening sockets; it is absolutely
required on most (all?) platforms, regardless of what code changes
might be required to work around the ability on Windows to
inadvertently have more than one server listening on the same ports |
d09d2649b35b54b9abb556c0d5e840589bb8a015 93248 |
|
05-Feb-2002 |
rbb |
This change keeps the server from allowing multiple instances to bind to
the same port. Previously, this was necessary, because the Windows MPM
was binding to the socket in both the parent and child. Today's code
passes the attached socket to the child from the parent, so we don't need
to re-attach in the child. |
fe2f263728bae9d43e45c5b4ab20ade8ebea6b67 93224 |
|
04-Feb-2002 |
rbb |
This patch allows the prefork MPM to print messages to the console if it
can't open a socket for some reason. |
fa4a32d01102e4d6d529be239f103e774dbe8697 93102 |
|
30-Jan-2002 |
bjh |
Remove more spmt_os2 MPM leftovers. |
b233166e0e79115f09a0dce905d0611b9c23a13c 92711 |
|
03-Jan-2002 |
bnicholes |
Making sure that the global variables have been initialized to avoid linker
problems at least on NetWare
Submitted by: Pavel Novy |
705c8ed3ef608706c91ca12483d7b54ff9007cc9 92387 |
|
08-Dec-2001 |
jerenkrantz |
Fix segfault when restarting worker MPM. We can not examine the POD as
a normal listener.
There was an additional bug than what Ian submitted to fix listen.c
(i.e. check sa for null): make_pipe_of_death does not zero out
lr->bind_addr (since it uses apr_palloc). So, on Solaris, the first
time through, bind_addr was probably 0, but the second time, not (pools!).
(This caused Aaron's analysis that the patch worked the first time,
but not the second time.)
Submitted by: Ian Holsman
Reviewed by: Justin Erenkrantz, Aaron Bannert |
cf24c48249f38c34c04617f5b78b240f1cee380a 92386 |
|
08-Dec-2001 |
jerenkrantz |
Clean up style (tabs->spaces, etc, etc, etc.). |
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69 91916 |
|
13-Nov-2001 |
rbb |
Allow modules that add sockets to the ap_listeners list to
define the function that should be used to accept on that
socket. Each MPM can define their own function to use for
the accept function with the MPM_ACCEPT_FUNC macro. This
also abstracts out all of the Unix accept error handling
logic, which has become out of synch across Unix MPMs.
The code flow is much easier now for different transports:
1) During pre-config, post-config or while parsing the config
file, add a socket to the ap_listeners list, making sure to
define an accept function at the same time.
2) MPMs find the correct listener, and call the accept function
that was defined in step 1.
3) That accept function returns a void pointer, which is passed
to the create_connection hook.
4) create_connection adds the correct low-level filters. |
8ea9794272347cfdd92861f46295406649f01afa 91494 |
|
16-Oct-2001 |
trawick |
Exit when we can't listen on any of the configured ports. This
is the same behavior as 1.3, and it avoids having the MPMs to
deal with bogus ap_listen_rec structures.
This also backs out some circumventions I and Greg Ames had added
to prefork; these are no longer necessary because of this change. |
e36ef0d081aa59867688bcbb3da65952ec16fae3 91293 |
|
04-Oct-2001 |
rbb |
Remove the Port directive. In it's place, the Listen directive
is now a required directive, which tells Apache what port to
listen on. The ServerName directive has also been extended
to accept an optional port. If the port is specified to the
ServerName, the server will report that port whenever it
reports the port that it is listening on. This change was
made to ease configuration errors that stem from having a Port
directive, and a Listen directive. In that situation, the server
would only listen to the port specified by the Listen command,
which caused a lot of confusion to users. |
7b4c4bb891261e613de39a021d7554fd08132fc5 90132 |
|
13-Aug-2001 |
rbb |
Begin to sanitize the MPM configuration directives. Now, all
MPMs use the same functions for all common MPM directives. This
should make it easier to catch all bugs in these directives once.
Everybody should check their favorite MPM to ensure that it still
compiles, and that these directives work. This is a big patch, and
although it looks good, and things compiled for me, that is no
garauntee that it will work on all platforms. :-)
Submitted by: Cody Sherr <csherr@covalent.net> |
4c6731b2f737f8d7fcacd44b97d9e6bab745f1a5 90131 |
|
13-Aug-2001 |
rbb |
Close a major resource leak. Everytime we had issued a
graceful restart, we leaked a socket descriptor.
The listening sockets should not be set inheritable, at least
not at this point. We only want some of the httpd children to
inherit the socket. Namely, those that will be actually serving
requests. Any other child process (piped logs), should not be
inheriting the sockets.
PR: 7891 |
006d2e18acffe78f6d51b629de640377a0c37451 89730 |
|
26-Jul-2001 |
wrowe |
Terniaries are broken under MSVC, they never did resolve how to resolve
the type of an obvious conversion like this one. Even casting the const
to an apr_port_t doesn't solve it. |
c154d7c9218dfdb9f293651e326ea1dcb3f1945b 89708 |
|
25-Jul-2001 |
jwoolley |
PR: |
94ee4cd7089433c8aa93723169d759a25d0f2be3 89594 |
|
18-Jul-2001 |
wrowe |
Omitted the arg |
6875bb6077176b7583578dd270518918a069007d 89593 |
|
18-Jul-2001 |
wrowe |
rbb's names still need work :) |
c49c786dc58938f915f20356d954ecec1de2d205 89592 |
|
18-Jul-2001 |
wrowe |
Changes to back out inherit flag from apr_os_sock_make()
and apr_socket_create() |
3c4f451140dd2ba70ee77274ed8155f451184917 89557 |
|
16-Jul-2001 |
rbb |
Added an inherit flag to apr_socket_create and other socket creation
functions. This allows APR programs to specify that a socket should
be passed to any child processes that are created. The inherit flag
is only meaningful if programs use apr_process_create(). This
also adds a couple of macros that allow APR types to set and unset
the inherit flag.
This also fixes Apache to use the new API. |
ca70ded17026ceeee35b52df57378476b8c1293b 88733 |
|
05-Apr-2001 |
trawick |
Now that APR knows when TCP_NODELAY is inherited, use its setting to
know when to set that option on the listening socket.
(not that I understand to start with why we bother saving this minimal
pathlength when it isn't inherited) |
1552c279a509d65352157731aa9cfdb9ef16c52c 88690 |
|
03-Apr-2001 |
rbb |
Add the code to actually enable accept filters in 2.0 |
ed105ee460bbaf479f0aa0f59d3951da85066e27 88498 |
|
12-Mar-2001 |
stoddard |
*) Reimplement the Windows MPM (mpm_winnt.c) to eliminate calling
DuplicateHandle on an IOCompletionPort (a practice which
MS "discourages"). The new model does not rely on associating
the completion port with the listening sockets, thus the
completion port can be completely managed within the child
process. A dedicated thread accepts connections off the network,
then calls PostQueuedCompletionStatus() to wake up worker
threads blocked on the completion port.
[Bill Stoddard] |
e4fe0877330b0131875939fbb9032e93505725a4 88482 |
|
09-Mar-2001 |
stoddard |
Fix a Windows seg fault on startup when multiple listen directives are being used.
The pool pointer in the local address field in apr_sock_t is not initialized until a
request is received. in general, we should not rely on the addressed in apr_sock_t
when doing work on the listen_recs. |
b99dbaab171d91e1b664397cc40e039d0c087c65 88184 |
|
16-Feb-2001 |
fielding |
Update copyright to 2001 |
024cd9589e52cf11ce765dfddb5b5f0c6e421a48 88061 |
|
10-Feb-2001 |
gstein |
*) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff |
066877f1a045103acfdd376d48cdd473c33f409b 88019 |
|
08-Feb-2001 |
dougm |
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by: |
36ec645c75288def69bf7b3a2179d161b5471a2c 87601 |
|
07-Jan-2001 |
rbb |
Stop leaking sockets. This is a minimal leak, but it was there.
Basically, we were creating a socket_t, but never assigning a port or
IP address to it. We then re-read the config file, and search the
list of allocated sockets for the socket that we have already allocated
for this port, but we never find the port and address, because we never
stored them in the socket_t. This was keeping the Listen directive from
working properly. |
1a4664791b3eca4f0ce3e19225fbd29e69739c67 87565 |
|
02-Jan-2001 |
rbb |
Modify a couple of calls to ap_log_error with a NULL server to use
ap_log_perror, and pass a pool. The keeps us from seg faulting if the
error log hasn't been opened yet. |
1c0d2d567fbd35126aaeb120620b0923a76c6fe4 87388 |
|
17-Dec-2000 |
trawick |
When the platform supports IPv6 (according to APR) and
the system is configured to support IPv6, Apache gets IPv6
listening sockets unless the Listen statement says otherwise
(i.e., Listen specifies an IPv4 numeric address string or a
hostname which resolves to an IPv4 address). |
9031ca023c55facc5591170007440604e48b93e5 87386 |
|
17-Dec-2000 |
trawick |
Call ap_log_error() instead of ap_log_rerror() from alloc_listener().
This bug, introduced in a recent commit, caused a segfault when the
hostname couldn't be resolved. |
28ce4a9baa76e678af814ec56aecaeeff7665f35 87371 |
|
16-Dec-2000 |
trawick |
tweak the responsibilities of make_sock() and alloc_listener()
because we need to resolve the hostname (i.e., call apr_getaddrinfo())
before creating the socket so that we get a socket of the appropriate
family
also, simplify some of the address displays in some error logs |
8e8a2cca6e131b46f61976d244a3c0eafd4a8890 87369 |
|
16-Dec-2000 |
trawick |
use apr_parse_addr_port() in ap_set_listener(); this allows IPv6
numeric address strings to be specified (though we wouldn't get
an IPv6 socket for it at the moment)
consolidate the use of APR_ANYADDR and make a note about its
protocol dependence |
975a6b04cafefef1ee539d5839a90b51f13790e2 87207 |
|
05-Dec-2000 |
bjh |
Include mpm.h so that we know which MPM is being built and therefore
when to export ap_listen_open(). |
a200a4f687024b2e4448ce2da9bde348e633be33 87134 |
|
29-Nov-2000 |
rbb |
Remove an unused header |
382fa07a63096c4a1aabfed36433ea5ac9c40ad0 87050 |
|
21-Nov-2000 |
trawick |
updates to changed interfaces to apr_set_port(), apr_get_port(),
apr_set_ipaddr(), and apr_get_ipaddr() |
db6d6970c955ef03a17d96a388b10ca2eb81e924 87024 |
|
19-Nov-2000 |
trawick |
Change apr_bind() to take apr_sockaddr_t. |
f565372276b78ef58318da589cfbddce0694852b 86892 |
|
09-Nov-2000 |
stoddard |
Clean up compiler warnings |
74b39333600dee3260355ad3a06e36ef6c61c8f1 86890 |
|
09-Nov-2000 |
dreid |
Change the code to reflect the recent API changes...
Alter http_vhost.c to use the new apr_get_inaddr fucntion. Old code is still
there just in case it breaks. can someone check it who knows this stuff? |
7afdaa3ee342af2e075f62c619b60628556f7205 86870 |
|
08-Nov-2000 |
dreid |
This adds the APR_LOCAL/APR_REMOTE to APR and changes the apr_get/set_port
functions to use it. This is onyl the start and I'll pause a while before
I continue in case people really hate this. The patch can be backed out and
all evidence will be removed, but I think this makes maintaining/developing
the code easier in the long term. |
dad234382d8424e1c5a30af2838e172aec9d6d1b 86866 |
|
08-Nov-2000 |
dreid |
Start of moving to apr_port_t in the server code. This will probably the first
of a few... |
b501b72e4bfed12a431278217ba66ae531d9a293 86441 |
|
08-Oct-2000 |
rbb |
Add back the ap_disable_nagle call in make_sock. However, this is a
performance enhancement only on platforms where turning off nagle is
inherited by accepted sockets. Because this is not always true, in order
to have the disable_nagle call active, the macro DISABLE_NAGLE_INHERITED
must be defined.
PR: 6531 |
0a61f90074837f6abc0d215519b6b4fbb7b08a0c 86179 |
|
08-Sep-2000 |
gregames |
Change prefork to use the same listen api as the rest of the unix mpms
(ap_setup_listeners). This eliminates the need to force a recompile of
listen.c when you switch to/from using prefork. |
1ccd992d37d62c8cb2056126f2234f64ec189bfd 85976 |
|
02-Aug-2000 |
dougm |
prefix libapr functions and types with apr_ |
b6055b7832a0e4d0818416252fff5925aaebae4b 85867 |
|
21-Jul-2000 |
rbb |
Move all APR functions related to strings to their own directory, and
create a new header for those functions. This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories. |
fbdf59d34eb318e1bfd39171e2d8cde1c8cfb035 85856 |
|
16-Jul-2000 |
bjh |
OS/2: Put back creation of listeners in main thread in spmt_os2 MPM. |
355ea18be961f4d35656d3aced89e2707fae78b7 85832 |
|
13-Jul-2000 |
rbb |
Fix the prefork MPM to make it compile and work again out-of-the-box. |
9aa4b0b53f1b26086d04c51d77e742b698cfa653 85809 |
|
10-Jul-2000 |
rbb |
Move setup_listeners to listen.c. This renames it to ap_setup_listeners,
and removes the duplicated code from all effected MPMs. The only this
doesn't touch, is Windows. That MPM was using a different setup_listeners.
If one of the Windows guys would like to modify the WinNT MPM to use the
same setup_lsiteners, that would be VERY cool. |
66d349e02d1a5a599a01c977d2c5b0009181f7de 85599 |
|
17-Jun-2000 |
ben |
More consification, correct command initialisation. |
48d7c43629323c8d5ee9f7bd0d194de0a376b391 85558 |
|
13-Jun-2000 |
rbb |
Protect system header files with the appropriate macros. |
404e2e1f8ad30c2d996f5fb6b3a9a4a4a14a004b 84963 |
|
14-Apr-2000 |
rbb |
Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages
on Linux, but probably breaks somewhere. |
7e79e8fd53348f9fc6e8009a4a2522425ab6f08f 84878 |
|
31-Mar-2000 |
fielding |
Update to Apache Software License version 1.1 |
5b3bfc360c7d1a1b3967548d68b416b9355357b9 84823 |
|
22-Mar-2000 |
trawick |
change the error message logged for a bind() failure so that
it shows the interface and port number; it is now very similar
to the error message used in 1.3 |
64185f9824e42f21ca7b9ae6c004484215c031a7 84725 |
|
10-Mar-2000 |
rbb |
Fix all the License issues. Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license |
2d71630471d1c23f0137309e3c3957c633ecbfd6 84531 |
|
28-Jan-2000 |
rbb |
Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
defined correctly in all C files. |
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44c 84493 |
|
19-Jan-2000 |
rbb |
Finish the commits for the change in the header files. Basically, this hides
all of the Apache macros that modules don't need access to. This should
have been committed with the modules, but I wasn't paying attention to the
directory I was in when I ran the commit.
Submitted by: Manoj Kasichainula and Ryan Bloom |
b2aa5d41b06d6e3a70629b4d25ad4757d2285cae 84072 |
|
30-Oct-1999 |
manoj |
Get rid of an implicit malloc, by making ap_create_tcp_socket use the
process context. |
acf57b44f2f61797023f7e9c2606cebf07f73d08 84029 |
|
24-Oct-1999 |
bjh |
Enhancements for APR network_io. Adds separate local/remote access methods for
a socket's port, IP address and sockaddr_in.
Updates for Apache code to use these, allowing the correct IP address of
clients to be logged. |
0942697a9b5de44865676345a3828741c827efe6 84007 |
|
20-Oct-1999 |
rbb |
Add a status value to ap_log_error and ap_log_rerror. This allows us to use
apr_status codes in our error logs. The main advantage of this, is portable
error codes. Now, Windows will finally be able to use errno! |
849e12777e5d0bb5e16e3fc0ec8443d0f0b4327e 83971 |
|
12-Oct-1999 |
martin |
I cannot solve this right now. But this variable sure was uninitialized |
9d2cce0e485f8d7156bda51b8b21e85703988438 83956 |
|
10-Oct-1999 |
rbb |
Bring network code to the parameter order spec. This means contexts go last,
and result parameters go first. Also fixed a small bug in the Makefile. We
should be removing the libs dir when we do a distclean, we are now. |
f374ab547057a2453963120a7d6cc9cf096a332d 83949 |
|
08-Oct-1999 |
dreid |
I think this was missed earlier, and as BeOS doesn't define SO_SNDBUF it was stopping the build. APR_SO_SNDBUF is defined and so all is well again. |
856cd04dde6122606dffc1c3c11200cdb1ea146e 83943 |
|
07-Oct-1999 |
bhyde |
Well this was thought provoking.
Drive out the use of malloc in two places.
In listen.c, using the global process pool instead. That changes the
API into listen so that a process is passed in rather than the config
pool. That's all was easy.
The pain is propogating a change into all N of the mpm, they
are all similar but different in their use of listen.c There
is a lot to dislike about similar but code scattered code.
I changed the N setup_listener routines, they now take only
the server since they can dig the config and global pool
out of there.
Free today: ap_setup_prelinked_modules now takes the process so it
can allocate it's table in the process's pool rathern than use
malloc. |
d936d7dcfc1a35dec2a026d23053f8230301cdff 83927 |
|
04-Oct-1999 |
rbb |
First patch to re-order function parameters. This one gets the low hanging
fruit, and moves most of the result parameters to the first argument.
Future patches in this series will move the rest of the result parameters
to the beginning of the list, and will move the context's to the end of the
list |
283cab4ec4c440fe33ce47778d85b1208e169a87 83918 |
|
25-Sep-1999 |
manoj |
Restarts were hosed after the APR changes because we were opening
sockets even when we had them open already. So, for now, add an "active"
flag that indicates whether the socket stored in the listen_rec is an
actual open socket yet. |
79f84e6d95b757a399c42fa58c9f78504512eee2 83906 |
|
18-Sep-1999 |
ben |
Make ap_getipaddr threadsafe. |
ab5581cc78e9d865b0a6ab1404c53347b3276968 83879 |
|
08-Sep-1999 |
rbb |
Remove all of the calls to functions like "ap_popenf". These functions were
moved down to APR, but they are being removed. They are not portable, and
were only moved down for backwards compatability. With this change, they can
be safely removed, which is the next commit on it's way.
Submitted by: Ryan Bloom and Paul Reder |
b4c8a80f7dbfc9b56dbe03bdc28f0b5eb5f23697 83852 |
|
31-Aug-1999 |
rbb |
Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly. |
a9f0f929d1ae487b32d071c8351bc8a8f5149e77 83743 |
|
21-Aug-1999 |
stoddard |
Forgot listen.c in the earlier AcceptEx patch to winnt.c.
Enable winnt mpm to detech OS at runtime. |
3f946bf758e001763e356ba2cbc4d824b31c80aa 83505 |
|
26-Jul-1999 |
dgaudet |
some bug fixes from David
Submitted by: David Reid <beos@server1.jetnet.co.uk> |
b29cef2891ae88e684c4540a39d9728ba95e0467 83394 |
|
29-Jun-1999 |
manoj |
Change method of checking for active FDs after poll() in the pthread
MPM. The new method doesn't require any changes to the listen
abstraction. |
a738df3559846995866c97d51d083631d08e5691 83390 |
|
27-Jun-1999 |
manoj |
Updated the pthread MPM to work with the rest of the code |
dc9d4f49d36e64c0157d930cb22ca82a6291c0cb 83385 |
|
25-Jun-1999 |
dgaudet |
- ap_listen.h: interface to Listen, ListenBackLog and SendBufferSize
directives
- I didn't update mpmt_pthread with this change, it shouldn't be hard to fix.
- maybe this isn't the best way to abstract listen... but it gets a little
bit of the job done |