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.
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:
}
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
}