Skip to content

Commit bfbea17

Browse files
committed
Add -r option for stateless reset excersice to traffic_quic
1 parent cc223b0 commit bfbea17

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/traffic_quic/quic_client.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ Http3ClientApp::start()
278278
// Connection Close Exercise
279279
this->_qc->close_quic_connection(
280280
QUICConnectionErrorUPtr(new QUICConnectionError(QUICTransErrorCode::NO_ERROR, "Close Exercise")));
281+
} else if (this->_config->reset) {
282+
// Stateless Reset Excercise
283+
this->_qc->reset_quic_connection();
281284
}
282285
});
283286

src/traffic_quic/quic_client.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ struct QUICClientConfig {
4040
char path[1018] = "/";
4141
char debug_tags[1024] = "quic|vv_quic_crypto|http3|qpack";
4242
int close = false;
43+
int reset = false;
4344
int http0_9 = true;
4445
int http3 = false;
4546
};

src/traffic_quic/traffic_quic.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ main(int argc, const char **argv)
6363
{"path", 'P', "Path", "S1017", config.path, nullptr, nullptr},
6464
{"debug", 'T', "Vertical-bar-separated Debug Tags", "S1023", config.debug_tags, nullptr, nullptr},
6565
{"close", 'c', "Enable connection close excercise", "F", &config.close, nullptr, nullptr},
66+
{"reset", 'r', "Enable stateless reset excercise", "F", &config.reset, nullptr, nullptr},
6667
{"http0_9", '-', "Enable HTTP/0.9", "T", &config.http0_9, nullptr, nullptr},
6768
{"http3", '-', "Enable HTTP/3", "F", &config.http3, nullptr, nullptr},
6869

0 commit comments

Comments
 (0)