MINOR: quic-be: Version Information transport parameter check
Add a little check to verify that the version chosen by the server matches with the client one. Initiliazes local transport parameters ->negotiated_version value with this version if this is the case. If not, return 0;
This commit is contained in:
parent
990c9f95f7
commit
5a711551a2
@ -213,9 +213,18 @@ static int quic_transport_param_dec_version_info(struct tp_version_information *
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server)
|
if (server) {
|
||||||
/* TODO: not supported */
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < quic_versions_nb; i++) {
|
||||||
|
if (tp->chosen == quic_versions[i].num) {
|
||||||
|
tp->negotiated_version = &quic_versions[i];
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (ver = others; ver < end; ver += 4) {
|
for (ver = others; ver < end; ver += 4) {
|
||||||
if (!tp->negotiated_version) {
|
if (!tp->negotiated_version) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user