projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f366cb7
)
MINOR: quic: Wrong value for version negotiation packet 'Unused' field
author
Frédéric Lécaille
<flecaille@haproxy.com>
Thu, 18 Nov 2021 12:54:43 +0000
(13:54 +0100)
committer
Frédéric Lécaille
<flecaille@haproxy.com>
Fri, 19 Nov 2021 13:37:35 +0000
(14:37 +0100)
The seven less significant bits of the first byte must be arbitrary.
Without this fix, QUIC tracker "version_negotiation" test could not pass.
src/xprt_quic.c
patch
|
blob
|
history
diff --git
a/src/xprt_quic.c
b/src/xprt_quic.c
index
86c7ff8
..
6b45630
100644
(file)
--- a/
src/xprt_quic.c
+++ b/
src/xprt_quic.c
@@
-3551,8
+3551,10
@@
static int qc_send_version_negotiation(int fd, struct sockaddr_storage *addr,
* header form
* long header, fixed bit to 0 for Version Negotiation
*/
- buf[i++] = '\x80';
+ if (RAND_bytes((unsigned char *)buf, 1) != 1)
+ return 1;
+ buf[i++] |= '\x80';
/* null version for Version Negotiation */
buf[i++] = '\x00';
buf[i++] = '\x00';