Fix server side vnego log
@@ -1206,15 +1206,18 @@ void picoquic_log_outgoing_segment(void* F_log, int log_cnxid, picoquic_cnx_t* c
ph.pn64 = sequence_number;
ph.pn = (uint32_t)ph.pn64;
+ if (ph.pn_offset != 0) {
ph.offset = ph.pn_offset + 4; /* todo: should provide the actual length */
ph.payload_length -= 4;
+ }
+ if (ph.ptype != picoquic_packet_version_negotiation) {
if (ph.payload_length > checksum_length) {
ph.payload_length -= (uint16_t)checksum_length;
}
else {
ph.payload_length = 0;
}
-
+ }
/* log the segment. */
picoquic_log_decrypted_segment(F_log, log_cnxid, cnx, 0,
&ph, bytes, length, ret);
