haproxy/include/types
Willy Tarreau be508f1580 BUG/MAJOR: samples: check smp->strm before using it
Since commit 6879ad3 ("MEDIUM: sample: fill the struct sample with the
session, proxy and stream pointers") merged in 1.6-dev2, the sample
contains the pointer to the stream and sample fetch functions as well
as converters use it heavily.

The problem is that earlier commit 87b0966 ("REORG/MAJOR: session:
rename the "session" entity to "stream"") had split the session and
stream resulting in the possibility for smp->strm to be NULL before
the stream was initialized. This is what happens in tcp-request
connection rulesets, as discovered by Baptiste.

The sample fetch functions must now check that smp->strm is valid
before using it. An alternative could consist in using a dummy stream
with nothing in it to avoid some checks but it would only result in
deferring them to the next step anyway, and making it harder to detect
that a stream is valid or the dummy one.

There is still an issue with variables which requires a complete
independant fix. They use strm->sess to find the session with strm
possibly NULL and passed as an argument. All call places indirectly
use smp->strm to build strm. So the problem is there but the API needs
to be changed to remove this duplicate argument that makes it much
harder to know what pointer to use.

This fix must be backported to 1.6, as well as the next one fixing
variables.
2016-03-10 16:42:58 +01:00
..
acl.h
action.h MINOR: stream/applet: add use-service action 2015-09-28 01:03:48 +02:00
applet.h MINOR: cli: add a new "show env" command 2016-02-16 11:43:03 +01:00
arg.h MEDIUM: logs: add a new RFC5424 log-format for the structured-data 2015-09-28 14:01:27 +02:00
auth.h
backend.h
capture.h
channel.h MEDIUM: filters: Replace filter_http_headers callback by an analyzer 2016-02-09 14:53:15 +01:00
checks.h MINOR: check: add agent-send server parameter 2015-11-04 07:26:51 +01:00
compression.h MAJOR: filters/http: Rewrite the HTTP compression as a filter 2016-02-09 14:53:15 +01:00
connection.h MAJOR: tproxy: remove support for cttproxy 2015-08-20 19:35:14 +02:00
counters.h
dns.h MEDIUM: dns: add a "resolve-net" option which allow to prefer an ip in a network 2016-02-19 14:37:49 +01:00
fd.h
filters.h MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
freq_ctr.h
global.h BUG/MEDIUM: config: properly adjust maxconn with nbproc when memmax is forced 2015-12-14 13:03:09 +01:00
hdr_idx.h
hlua.h BUG/MAJOR: lua: segfault using Concat object 2016-02-19 13:24:09 +01:00
lb_chash.h
lb_fas.h
lb_fwlc.h
lb_fwrr.h
lb_map.h
listener.h MEDIUM: ssl: Add options to forge SSL certificates 2015-06-12 18:06:59 +02:00
log.h MEDIUM: log: add a new log format flag "E" 2016-02-12 13:36:47 +01:00
mailers.h MINOR: mailers: make it possible to configure the connection timeout 2016-02-20 15:33:06 +01:00
map.h
obj_type.h
pattern.h MINOR: map: Add regex matching replacement 2016-02-10 23:38:34 +01:00
peers.h CLEANUP: proxy: remove last references to appsession 2015-08-10 19:42:30 +02:00
pipe.h
port_range.h
proto_http.h MINOR: filters/http: Slightly update the parsing of chunks 2016-02-09 14:53:15 +01:00
proto_udp.h MEDIUM: protocol: add minimalist UDP protocol client 2015-06-13 22:07:35 +02:00
protocol.h
proxy.h MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
queue.h
sample.h BUG/MAJOR: samples: check smp->strm before using it 2016-03-10 16:42:58 +01:00
server.h MEDIUM: dns: add a "resolve-net" option which allow to prefer an ip in a network 2016-02-19 14:37:49 +01:00
session.h MEDIUM: vars: move the session variables to the session, not the stream 2015-06-19 11:59:02 +02:00
signal.h
ssl_sock.h MEDIUM: Add support for updating TLS ticket keys via socket 2015-05-16 11:28:04 +02:00
stick_table.h MEDIUM: stick-tables: Add GPT0 in the stick tables 2015-08-20 17:13:47 +02:00
stream.h MINOR: filters: Add stream_filters structure to hide filters info 2016-02-09 14:53:15 +01:00
stream_interface.h
task.h
template.h
vars.h MINOR: samples: rename a struct from sample_storage to sample_data 2015-08-20 17:13:46 +02:00