From 28547e96cc2b1be9ebdea7455c46f12fe76d90c7 Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Mon, 22 Feb 2021 15:01:38 +0100 Subject: [PATCH] Fix typos in network emulation default routing Bug: b/180750880 Change-Id: I8a927d5cb66af2292eff13382ed956def1585922 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208481 Reviewed-by: Andrey Logvin Commit-Queue: Artem Titov Cr-Commit-Position: refs/heads/master@{#33318} --- test/network/network_emulation.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/network/network_emulation.cc b/test/network/network_emulation.cc index 9251cfe2b4..33de45b810 100644 --- a/test/network/network_emulation.cc +++ b/test/network/network_emulation.cc @@ -447,7 +447,7 @@ EmulatedEndpointImpl::Options::Options(uint64_t id, allow_send_packet_with_different_source_ip( config.allow_send_packet_with_different_source_ip), allow_receive_packets_with_different_dest_ip( - config.allow_send_packet_with_different_source_ip), + config.allow_receive_packets_with_different_dest_ip), log_name(ip.ToString() + " (" + config.name.value_or("") + ")") {} EmulatedEndpointImpl::EmulatedEndpointImpl(const Options& options, @@ -583,7 +583,7 @@ rtc::IPAddress EmulatedEndpointImpl::GetPeerLocalAddress() const { void EmulatedEndpointImpl::OnPacketReceived(EmulatedIpPacket packet) { RTC_DCHECK_RUN_ON(task_queue_); - if (options_.allow_receive_packets_with_different_dest_ip) { + if (!options_.allow_receive_packets_with_different_dest_ip) { RTC_CHECK(packet.to.ipaddr() == options_.ip) << "Routing error: wrong destination endpoint. Packet.to.ipaddr()=: " << packet.to.ipaddr().ToString()