Disable GSO if error confirmed
@@ -375,10 +375,12 @@ int picoquic_packet_loop(picoquic_quic_t* quic,
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);
}
+ if (send_msg_ptr != NULL && send_length > send_msg_size) {
sock_ret = -1;
sock_err = EIO;
}
}
+ }
if (sock_ret <= 0) {
if (last_cnx == NULL) {
@@ -418,9 +420,11 @@ 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);
}
+ if (send_msg_ptr != NULL) {
/* 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");
+ picoquic_log_app_message(last_cnx, "%s", "UDP GSO was disabled");
+ }
}
}
}
