BUG/MINOR: quic: Wrong endianess for version field in Retry token

This field must be sent in network byte order.

Must be backported as far as 2.6.
This commit is contained in:
Frédéric Lécaille 2023-06-30 14:57:30 +02:00
parent 5997d18c78
commit 17eaee31c3

View File

@ -6424,7 +6424,7 @@ static int quic_generate_retry_token_aad(unsigned char *aad,
unsigned char *p;
p = aad;
memcpy(p, &version, sizeof version);
*(uint32_t *)p = htonl(version);
p += sizeof version;
p += quic_saddr_cpy(p, addr);
memcpy(p, cid->data, cid->len);