haproxy/include/proto
Willy Tarreau 958f0742a2 BUG/MEDIUM: stream-int: avoid double-call to applet->release
While the SI_ST_DIS state is set *after* doing the close on a connection,
it was set *before* calling release on an applet. Applets have no internal
flags contrary to connections, so they have no way to detect they were
already released. Because of this it happened that applets were closed
twice, once via si_applet_release() and once via si_release_endpoint() at
the end of a transaction. The CLI applet could perform a double free in
this case, though the situation to cause it is quite hard because it
requires that the applet is stuck on output in states that produce very
few data.

In order to solve this, we now assign the SI_ST_DIS state *after* calling
->release, and we refrain from doing so if the state is already assigned.
This makes applets work much more like connections and definitely avoids
this double release.

In the future it might be worth making applets have their own flags like
connections to carry their own state regardless of the stream interface's
state, especially when dealing with connection reuse.

No backport is needed since this issue was caused by the rearchitecture
in 1.6.
2015-09-25 21:16:03 +02:00
..
acl.h MAJOR: sample: pass a pointer to the session to each sample fetch function 2015-04-06 11:37:25 +02:00
action.h MINOR: actions: mutualise the action keyword lookup 2015-08-20 17:13:47 +02:00
applet.h MINOR: applet: rename applet_runq to applet_active_queue 2015-09-25 18:02:44 +02:00
arg.h MINOR: global: export many symbols. 2015-02-28 23:12:32 +01:00
auth.h MEDIUM: pattern: The match function browse itself the list or the tree. 2014-03-17 18:06:07 +01:00
backend.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
channel.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
checks.h MAJOR: server: add DNS-based server name resolution 2015-06-13 22:07:35 +02:00
compression.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
connection.h MINOR: connection: add a new list member in the connection struct 2015-08-06 11:00:34 +02:00
dns.h CLEANUP/MINOR: dns: dns_str_to_dn_label() only needs a const char 2015-07-22 16:42:43 +02:00
dumpstats.h CLEANUP: applet: rename struct si_applet to applet 2015-04-23 17:56:16 +02:00
fd.h MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
freq_ctr.h MINOR: freq_ctr: introduce a new averaging method 2014-06-17 17:15:51 +02:00
frontend.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
hdr_idx.h OPTIM/MINOR: move the hdr_idx pools out of the proxy struct 2011-10-24 18:15:04 +02:00
hlua.h BUILD/MINOR: lua: ensure that hlua_ctx_destroy is properly defined 2015-06-17 20:18:54 +02:00
lb_chash.h
lb_fas.h MEDIUM: backend: add the 'first' balancing algorithm 2012-02-21 22:27:27 +01:00
lb_fwlc.h
lb_fwrr.h
lb_map.h
listener.h CLEANUP: fix missing include <string.h> in proto/listener.h 2013-06-14 19:52:17 +02:00
log.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
map.h MINOR: samples: rename some struct member from "smp" to "data" 2015-08-20 17:13:46 +02:00
obj_type.h CLEANUP: applet: rename struct si_applet to applet 2015-04-23 17:56:16 +02:00
pattern.h MINOR: samples: rename a struct from sample_storage to sample_data 2015-08-20 17:13:46 +02:00
payload.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
peers.h MAJOR: peers: peers protocol version 2.0 2015-05-29 15:50:33 +02:00
pipe.h
port_range.h
proto_http.h MINOR: http: made CHECK_HTTP_MESSAGE_FIRST accessible to other functions 2015-09-21 12:05:26 +02:00
proto_tcp.h CLEANUP: actions: missplaced includes 2015-09-10 21:17:04 +02:00
proto_udp.h MEDIUM: protocol: add minimalist UDP protocol client 2015-06-13 22:07:35 +02:00
proto_uxst.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
protocol.h MEDIUM: protocol: use a family array to index the protocol handlers 2015-02-28 23:12:31 +01:00
proxy.h CLEANUP: proxy: remove last references to appsession 2015-08-10 19:42:30 +02:00
queue.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
raw_sock.h REORG: connection: rename the data layer the "transport layer" 2012-10-04 22:26:09 +02:00
sample.h MEDIUM: samples: Use the "struct sample_data" in the "struct sample" 2015-08-20 17:13:46 +02:00
server.h MINOR: config: new backend directives: load-server-state-from-file and server-state-file-name 2015-09-19 17:05:28 +02:00
session.h MINOR: session: introduce session_new() 2015-04-06 11:37:33 +02:00
shctx.h BUG/MAJOR: ssl: Fallback to private session cache if current lock mode is not supported. 2014-05-08 22:46:32 +02:00
signal.h CLEANUP: includes: fix includes for a number of users of fd.h 2012-09-03 20:49:14 +02:00
ssl_sock.h MINOR: ssl: provide ia function to set the SNI extension on a connection 2015-07-10 11:37:29 +02:00
stick_table.h MEDIUM: stick-table: remove the now duplicate find_stktable() function 2015-05-26 12:08:07 +02:00
stream_interface.h BUG/MEDIUM: stream-int: avoid double-call to applet->release 2015-09-25 21:16:03 +02:00
stream.h BUG/MEDIUM: stick-tables: fix double-decrement of tracked entries 2015-09-21 17:48:24 +02:00
task.h MAJOR: poll: only rely on wake_expired_tasks() to compute the wait delay 2015-02-28 23:12:30 +01:00
template.h
vars.h MINOR: vars: returns variable content 2015-07-22 00:48:24 +02:00