| Index: net/tools/quic/quic_dispatcher.cc
|
| diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc
|
| index 1771026c97a765f515c23e9813c185cb2d294149..8f19cf4e54b13b9414109978b59f846d5b6322ef 100644
|
| --- a/net/tools/quic/quic_dispatcher.cc
|
| +++ b/net/tools/quic/quic_dispatcher.cc
|
| @@ -24,7 +24,6 @@ namespace net {
|
| namespace tools {
|
|
|
| using base::StringPiece;
|
| -using std::make_pair;
|
|
|
| class DeleteSessionsAlarm : public EpollAlarm {
|
| public:
|
| @@ -209,6 +208,13 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader(
|
| const QuicPacketPublicHeader& header) {
|
| QuicSession* session = nullptr;
|
|
|
| + // Port zero is only allowed for unidirectional UDP, so is disallowed by QUIC.
|
| + // Given that we can't even send a reply rejecting the packet, just black hole
|
| + // it.
|
| + if (current_client_address_.port() == 0) {
|
| + return false;
|
| + }
|
| +
|
| QuicConnectionId connection_id = header.connection_id;
|
| SessionMap::iterator it = session_map_.find(connection_id);
|
| if (it == session_map_.end()) {
|
| @@ -247,7 +253,7 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader(
|
| return HandlePacketForTimeWait(header);
|
| }
|
| DVLOG(1) << "Created new session for " << connection_id;
|
| - session_map_.insert(make_pair(connection_id, session));
|
| + session_map_.insert(std::make_pair(connection_id, session));
|
| } else {
|
| session = it->second;
|
| }
|
| @@ -345,7 +351,7 @@ void QuicDispatcher::OnWriteBlocked(
|
| // infinite loops in OnCanWrite.
|
| return;
|
| }
|
| - write_blocked_list_.insert(make_pair(blocked_writer, true));
|
| + write_blocked_list_.insert(std::make_pair(blocked_writer, true));
|
| }
|
|
|
| void QuicDispatcher::OnConnectionAddedToTimeWaitList(
|
|
|