QBONE Bonnet: Ensure `eth_hdr_` is initialized when sending neighbor solicit responses. The initialization was moved to WritePacket, but it's possible that the device reads a neighbor solicitation packet before any inbound packets have been written. Caught by memory sanitizer run of a unit test that only reads packets. This now passes `blaze test --config=msan//third_party/quic/qbone/bonnet:tun_device_packet_exchanger_test` PiperOrigin-RevId: 941117920
diff --git a/quiche/quic/qbone/bonnet/tun_device_packet_exchanger.cc b/quiche/quic/qbone/bonnet/tun_device_packet_exchanger.cc index d15c38c..7575359 100644 --- a/quiche/quic/qbone/bonnet/tun_device_packet_exchanger.cc +++ b/quiche/quic/qbone/bonnet/tun_device_packet_exchanger.cc
@@ -185,6 +185,10 @@ } if (is_neighbor_solicit) { + // We need the local interface MAC address to respond. + if (!eth_hdr_initialized_) { + InitializeEthHdr(); + } // If we've received a neighbor solicitation, craft an advertisement to // respond with and write it back to the local interface. auto* icmp6_payload = packet.data() + kIcmp6PrefixLen;