ICMP reachability prober: correct broken `sendto` size comparison and include a `QUIC_PLOG` to log the error code. `packet.size()` is an unsigned `size_t`, whereas the return value of `sendto` is stored as (signed) `ssize_t` to allow for `-1` error values. In an error condition this comparison was promoting `-1` to unsigned resulting in a Very Large Number and not reporting the error. PiperOrigin-RevId: 845864826
diff --git a/quiche/quic/qbone/bonnet/icmp_reachable.cc b/quiche/quic/qbone/bonnet/icmp_reachable.cc index 76fd84e..3b967a7 100644 --- a/quiche/quic/qbone/bonnet/icmp_reachable.cc +++ b/quiche/quic/qbone/bonnet/icmp_reachable.cc
@@ -176,8 +176,9 @@ reinterpret_cast<struct sockaddr*>(&dst_), sizeof(sockaddr_in6)); - if (size < packet.size()) { + if (size < static_cast<ssize_t>(packet.size())) { stats_->OnWriteError(errno); + QUIC_PLOG(ERROR) << "Unable to send ICMP echo request:"; } start_ = clock_->Now(); });