Disable GSO on first EIO error.
@@ -371,9 +371,13 @@ int picoquic_packet_loop(picoquic_quic_t* quic,
(struct sockaddr*)&peer_addr, (struct sockaddr*)&local_addr, if_index,
(const char*)send_buffer, (int)send_length, (int)send_msg_size, &sock_err);
- if (sock_ret != (int)send_length && last_cnx != NULL) {
+ if (sock_ret != (int)send_length && sock_ret > 0){
+ if (last_cnx != NULL) {
picoquic_log_app_message(last_cnx, "sendmsg(%zu, %zu) => %d, err=%d", send_length, send_msg_size, sock_ret, sock_err);
}
+ sock_ret = -1;
+ sock_err = EIO;
+ }
}
if (sock_ret <= 0) {
@@ -414,6 +418,9 @@ int picoquic_packet_loop(picoquic_quic_t* quic,
picoquic_log_app_message(last_cnx, "Retry of %zu bytes by chunks of %zu bytes succeeds.",
send_length, send_msg_size);
}
+ /* Make sure that we do not use GSO anymore in this run */
+ send_msg_ptr = NULL;
+ picoquic_log_app_message(last_cnx, "UDP GSO was disabled");
}
}
}
