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;
return 0;
}
- if (server)
- /* TODO: not supported */
+ if (server) {
+ 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;
+ }
for (ver = others; ver < end; ver += 4) {
if (!tp->negotiated_version) {