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.
/* 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;