summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 16:53:52 +0000
committerszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 16:53:52 +0000
commitffb4e205c2c9e6a2b03bf8106d31217b3c9f7e2a (patch)
treeb7dcb1a5b59cc0a3e02ffa32ab88aab1e386c2ee /net/socket
parent3bd4c00a48a495f18c443d2f2051dc7f5fbc269e (diff)
downloadchromium_src-ffb4e205c2c9e6a2b03bf8106d31217b3c9f7e2a.zip
chromium_src-ffb4e205c2c9e6a2b03bf8106d31217b3c9f7e2a.tar.gz
chromium_src-ffb4e205c2c9e6a2b03bf8106d31217b3c9f7e2a.tar.bz2
[net/dns] Don't abandon a DnsUDPAttempt when the response does not match the query.
When an unexpected packet is read from the socket, the current behavior is to give up on this attempt and immediately make another one. Considerable fraction of observed failures is due to ERR_DNS_MALFORMED_RESPONSE errors which might be false positives. For example, if behind a NAT, we might be receiving packets through stale mappings (addressed to other hosts). Rather than simply ignoring malformed packets, this CL implements the behavior: "don't give up on this attempt, but immediately make another one." BUG=107413 TEST=./net_unittests --gtest_filter=DnsTransactionTest.MalformedResponse* Review URL: https://chromiumcodereview.appspot.com/10824238 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/socket_test_util.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index e0ce38e..2811983 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -311,7 +311,6 @@ class DelayedSocketData : public StaticSocketDataProvider {
// a MockRead to complete.
// |reads| the list of MockRead completions.
// |writes| the list of MockWrite completions.
- // Note: All MockReads and MockWrites must be async.
// Note: For stream sockets, the MockRead list must end with a EOF, e.g., a
// MockRead(true, 0, 0);
DelayedSocketData(int write_delay,
@@ -323,7 +322,6 @@ class DelayedSocketData : public StaticSocketDataProvider {
// |write_delay| the number of MockWrites to complete before allowing
// a MockRead to complete.
// |writes| the list of MockWrite completions.
- // Note: All MockReads and MockWrites must be async.
// Note: For stream sockets, the MockRead list must end with a EOF, e.g., a
// MockRead(true, 0, 0);
DelayedSocketData(const MockConnect& connect, int write_delay,