From 7e657d65f3468bddf701e0861035915f641d381d Mon Sep 17 00:00:00 2001 From: Anatoly Yakovenko Date: Mon, 2 Jul 2018 14:59:33 -0700 Subject: [PATCH] merged f2ab08c65e0bfeec7f9338aa4cc3ab2a206ced5e --- src/crdt.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/crdt.rs b/src/crdt.rs index f9ec4b22d2..cbf9d8959f 100644 --- a/src/crdt.rs +++ b/src/crdt.rs @@ -945,9 +945,14 @@ impl TestNode { let gossip = UdpSocket::bind(local_gossip_addr).unwrap(); let replicate = UdpSocket::bind(local_replicate_addr).unwrap(); let requests = UdpSocket::bind(local_requests_addr).unwrap(); + let repair = UdpSocket::bind(local_repair_addr).unwrap(); let gossip_send = UdpSocket::bind("0.0.0.0:0").unwrap(); - let respond = UdpSocket::bind("0.0.0.0:0").unwrap(); + + // Responses are sent from the same Udp port as requests are received + // from, in hopes that a NAT sitting in the middle will route the + // response Udp packet correctly back to the requester. + let respond = requests_socket.try_clone().unwrap(); let broadcast = UdpSocket::bind("0.0.0.0:0").unwrap(); let retransmit = UdpSocket::bind("0.0.0.0:0").unwrap(); TestNode {