Make QUIC server set fixed bit in version negotiation packets

The IETF spec changed to SHOULD set fixed bit on sending, and MUST ignore on receipt. This CL makes us set it and does not change the fact that we already ignore it.

gfe-relnote: change an unused bit in version negotiation, protected by gfe2_reloadable_flag_quic_send_version_negotiation_fixed_bit
PiperOrigin-RevId: 247296000
Change-Id: I3041b5de8310d06f3a613e3f6d9a26e3671640f6
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 7524b17..adbe794 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -1434,6 +1434,10 @@
 
   // TODO(fayang): Randomly select a value for the type.
   uint8_t type = static_cast<uint8_t>(FLAGS_LONG_HEADER);
+  if (GetQuicReloadableFlag(quic_send_version_negotiation_fixed_bit)) {
+    QUIC_RELOADABLE_FLAG_COUNT(quic_send_version_negotiation_fixed_bit);
+    type |= static_cast<uint8_t>(FLAGS_FIXED_BIT);
+  }
   if (!writer.WriteUInt8(type)) {
     return nullptr;
   }
diff --git a/quic/core/quic_framer_test.cc b/quic/core/quic_framer_test.cc
index 700c4cf..4af5b3a 100644
--- a/quic/core/quic_framer_test.cc
+++ b/quic/core/quic_framer_test.cc
@@ -6556,9 +6556,13 @@
       // version tag
       QUIC_VERSION_BYTES,
   };
+  unsigned char type44 = 0x80;
+  if (GetQuicReloadableFlag(quic_send_version_negotiation_fixed_bit)) {
+    type44 = 0xC0;
+  }
   unsigned char packet44[] = {
       // type (long header)
-      0x80,
+      type44,
       // version tag
       0x00, 0x00, 0x00, 0x00,
       // connection_id length
diff --git a/quic/core/quic_versions.cc b/quic/core/quic_versions.cc
index c8c55e4..01e08d2 100644
--- a/quic/core/quic_versions.cc
+++ b/quic/core/quic_versions.cc
@@ -434,6 +434,8 @@
   SetQuicReloadableFlag(quic_use_uber_received_packet_manager, true);
   SetQuicReloadableFlag(quic_validate_packet_number_post_decryption, true);
   SetQuicReloadableFlag(quic_print_tag_hex, true);
+  SetQuicReloadableFlag(quic_send_version_negotiation_fixed_bit, true);
+  SetQuicRestartFlag(quic_server_drop_version_negotiation, true);
   SetQuicRestartFlag(quic_enable_accept_random_ipn, true);
 }