mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-09 08:51:28 -04:00
MINOR: proxy: switch to conn->src in error snapshots
The source address was taken unchecked from a client connection. In practice we know it's set but better strengthen this now.
This commit is contained in:
parent
71e34c186a
commit
026efc71c8
1 changed files with 2 additions and 2 deletions
|
|
@ -1525,8 +1525,8 @@ void proxy_capture_error(struct proxy *proxy, int is_back,
|
|||
es->when = date; // user-visible date
|
||||
es->srv = objt_server(target);
|
||||
es->oe = other_end;
|
||||
if (objt_conn(sess->origin))
|
||||
es->src = __objt_conn(sess->origin)->addr.from;
|
||||
if (objt_conn(sess->origin) && conn_get_src(__objt_conn(sess->origin)))
|
||||
es->src = *__objt_conn(sess->origin)->src;
|
||||
else
|
||||
memset(&es->src, 0, sizeof(es->src));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue