diff --git a/src/backend.c b/src/backend.c index eab4ea6a1..1791a38e6 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1869,6 +1869,9 @@ skip_reuse: srv_conn->src = bind_addr; bind_addr = NULL; + /* copy the target address into the connection */ + *srv_conn->dst = *s->scb->dst; + /* mark? */ if (s->flags & SF_BC_MARK) { srv_conn->mark = s->bc_mark; @@ -1893,10 +1896,6 @@ skip_reuse: if (!srv_conn) return SF_ERR_RESOURCE; - /* copy the target address into the connection */ - if (s->scb->dst) - *srv_conn->dst = *s->scb->dst; - /* Copy network namespace from client connection */ srv_conn->proxy_netns = cli_conn ? cli_conn->proxy_netns : NULL;