RFC says: An endpoint MUST NOT send a Version Negotiation packet in response to receiving a Version Negotiation packet.
QUICHE currently does not check this. This is an important mechanism to prevent looping.
It should be enough to do this in QuicDispatcher::MaybeSendVersionNegotiationPacket:
if (packet_info.form == IETF_QUIC_LONG_HEADER_PACKET
&& packet_info.long_packet_type == QuicLongHeaderType::VERSION_NEGOTIATION) {
QUIC_DVLOG(1) << "Dropping the received VN packet without response.";
return;
}