mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
ctdb: make use of ctdb_canonicalize_ip_inplace() in ctdb_control_tcp_client()
We could also remove the src_addr and dest_addr helper variables completely, but that would be too much for this commit. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> (cherry picked from commit 5f52d140f7b676ed68b5ce49d4445357bcbcb1a6)
This commit is contained in:
parent
d7249b3cbd
commit
9d8768ffd3
@ -1281,15 +1281,11 @@ int32_t ctdb_control_tcp_client(struct ctdb_context *ctdb, uint32_t client_id,
|
||||
|
||||
tcp_sock = (struct ctdb_connection *)indata.dptr;
|
||||
|
||||
ctdb_canonicalize_ip_inplace(&tcp_sock->src);
|
||||
src_addr = tcp_sock->src;
|
||||
ctdb_canonicalize_ip(&src_addr, &tcp_sock->src);
|
||||
ZERO_STRUCT(src_addr);
|
||||
memcpy(&src_addr, &tcp_sock->src, sizeof(src_addr));
|
||||
|
||||
ctdb_canonicalize_ip_inplace(&tcp_sock->dst);
|
||||
dst_addr = tcp_sock->dst;
|
||||
ctdb_canonicalize_ip(&dst_addr, &tcp_sock->dst);
|
||||
ZERO_STRUCT(dst_addr);
|
||||
memcpy(&dst_addr, &tcp_sock->dst, sizeof(dst_addr));
|
||||
|
||||
vnn = find_public_ip_vnn(ctdb, &dst_addr);
|
||||
if (vnn == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user