Skip to content

Commit

Permalink
feat(qns): implement v2 testcase (#1570)
Browse files Browse the repository at this point in the history
* feat(qns): implement v2 testcase

Add support for Quic Network Simulator `v2` testcase.

In `v2` testcase, don't restrict the server to `Version::Version1`, thus
allowing the server to upgrade incoming `Version::Version1` connection to
compatible `Version::Version2` connection.

See also [Quic Network Simulator `v2` testcase implementation](
https://github.com/quic-interop/quic-interop-runner/blob/ca27dcb5272a82d994337ae3d14533c318d81b76/testcases.py#L1460-L1545).

* Set use_old_http
  • Loading branch information
mxinden committed Jan 21, 2024
1 parent dc61acd commit a334be2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions neqo-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,9 @@ fn main() -> Res<()> {
args.use_old_http = true;
args.key_update = true;
}
"v2" => {
args.use_old_http = true;
}
_ => exit(127),
}
}
Expand Down
14 changes: 10 additions & 4 deletions neqo-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,12 @@ fn main() -> Result<(), io::Error> {

if let Some(testcase) = args.qns_test.as_ref() {
if args.quic_parameters.quic_version.is_empty() {
// Quic Interop Runner expects the server to support `Version1` only.
// Exceptions are testcases `versionnegotiation` and `v2`. Neither are
// supported by Neqo. Thus always set `Version1`.
args.quic_parameters.quic_version = vec![VersionArg(Version::Version1)];
// Quic Interop Runner expects the server to support `Version1`
// only. Exceptions are testcases `versionnegotiation` (not yet
// implemented) and `v2`.
if testcase != "v2" {
args.quic_parameters.quic_version = vec![VersionArg(Version::Version1)];
}
} else {
qwarn!("Both -V and --qns-test were set. Ignoring testcase specific versions.");
}
Expand Down Expand Up @@ -868,6 +870,10 @@ fn main() -> Result<(), io::Error> {
args.alpn = String::from(HQ_INTEROP);
args.retry = true;
}
"v2" => {
args.use_old_http = true;
args.alpn = String::from(HQ_INTEROP);
}
_ => exit(127),
}
}
Expand Down

0 comments on commit a334be2

Please sign in to comment.