mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-19 20:27:01 +00:00
OPTIM/MINOR: mark the source address as already known on accept()
Commit 986a9d2d12
moved the source address from the stream interface
to the session, but it did not set the flag on the connection to
report that the source address is known. Thus when logs are enabled,
we had a call to getpeername() which is redundant with the result
from accept(). This patch simply sets the flag.
This commit is contained in:
parent
2f877304ef
commit
38d5892634
@ -107,7 +107,7 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
|
||||
/* OK, we're keeping the session, so let's properly initialize the session */
|
||||
s->si[0].conn->t.sock.fd = cfd;
|
||||
s->si[0].conn->ctrl = l->proto;
|
||||
s->si[0].conn->flags = CO_FL_NONE;
|
||||
s->si[0].conn->flags = CO_FL_NONE | CO_FL_ADDR_FROM_SET;
|
||||
s->si[0].conn->err_code = CO_ER_NONE;
|
||||
s->si[0].conn->addr.from = *addr;
|
||||
s->si[0].conn->target = &l->obj_type;
|
||||
|
Loading…
Reference in New Issue
Block a user