mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: connection: don't use clear_addr() anymore, just release the address
Now that we have dynamically allocated addresses, there's no need to clear an address before reusing it, just release it. Note that this is not equivalent to saying that an address is never zero, as shown in assign_server_address() where an address 0.0.0.0 can still be assigned to a connection for the time it takes to modify it.
This commit is contained in:
parent
e71fca81dd
commit
16aa4aff6b
@ -1054,8 +1054,7 @@ static void assign_tproxy_address(struct stream *s)
|
||||
if (cli_conn && conn_get_src(cli_conn))
|
||||
*srv_conn->src = *cli_conn->src;
|
||||
else {
|
||||
/* FIXME WTA: the dynamic address may be released here */
|
||||
memset(srv_conn->src, 0, sizeof(*srv_conn->src));
|
||||
sockaddr_free(&srv_conn->src);
|
||||
}
|
||||
break;
|
||||
case CO_SRC_TPROXY_DYN:
|
||||
@ -1076,8 +1075,7 @@ static void assign_tproxy_address(struct stream *s)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* FIXME WTA: the dynamic address may be released here */
|
||||
memset(srv_conn->src, 0, sizeof(*srv_conn->src));
|
||||
sockaddr_free(&srv_conn->src);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user