haproxy/include/proto
Willy Tarreau 6204cd9f27 BUG/MAJOR: vars: always retrieve the stream and session from the sample
This is the continuation of previous patch called "BUG/MAJOR: samples:
check smp->strm before using it".

It happens that variables may have a session-wide scope, and that their
session is retrieved by dereferencing the stream. But nothing prevents them
from being used from a streamless context such as tcp-request connection,
thus crashing the process. Example :

    tcp-request connection accept if { src,set-var(sess.foo) -m found }

In order to fix this, we have to always ensure that variable manipulation
only happens via the sample, which contains the correct owner and context,
and that we never use one from a different source. This results in quite a
large change since a lot of functions are inderctly involved in the call
chain, but the change is easy to follow.

This fix must be backported to 1.6, and requires the last two patches.
2016-03-10 17:28:04 +01: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: http/tcp: fill the avalaible actions 2015-10-02 22:56:11 +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 BUG/MEDIUM: channel: fix miscalculation of available buffer space. 2016-01-25 02:31:18 +01:00
checks.h MAJOR: server: add DNS-based server name resolution 2015-06-13 22:07:35 +02:00
compression.h REORG: filters: Prepare creation of the HTTP compression filter 2016-02-09 14:53:15 +01:00
connection.h MINOR: connection: add a new list member in the connection struct 2015-08-06 11:00:34 +02:00
dns.h MEDIUM: dns: extract options 2016-02-19 14:37:46 +01: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
filters.h MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
flt_http_comp.h MAJOR: filters/http: Rewrite the HTTP compression as a filter 2016-02-09 14:53:15 +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_fcn.h MINOR: lua: move common function 2016-02-12 11:08:53 +01: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 MEDIUM: log: add a new log format flag "E" 2016-02-12 13:36:47 +01: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: map: Add regex matching replacement 2016-02-10 23:38:34 +01: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 REORG: filters: Prepare creation of the HTTP compression filter 2016-02-09 14:53:15 +01: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 MINOR: sample: add a new helper to initialize the owner of a sample 2016-03-10 16:42:58 +01:00
server.h MINOR: server: generalize the "updater" source 2016-02-24 23:37:39 +01: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 BUG/MINOR: ssl: Be sure to use unique serial for regenerated certificates 2016-02-09 09:04:53 +01: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: stream_interface: Reuse connection even if the output channel is empty 2016-02-03 14:22:55 +01:00
stream.h MINOR: stream/applet: add use-service action 2015-09-28 01:03:48 +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 BUG/MAJOR: vars: always retrieve the stream and session from the sample 2016-03-10 17:28:04 +01:00