Skip to content

Commit 134613b

Browse files
committed
Reject DATAGRAMs larger than the send buffer
1 parent c813740 commit 134613b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

quinn-proto/src/connection/datagrams.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ impl Datagrams<'_> {
3636
return Err(SendDatagramError::TooLarge);
3737
}
3838
if drop {
39+
if data.len() > self.conn.config.datagram_send_buffer_size {
40+
return Err(SendDatagramError::TooLarge);
41+
}
3942
self.conn.datagrams.drop_until_send_buffer_has_space(
4043
data.len(),
4144
self.conn.config.datagram_send_buffer_size,

0 commit comments

Comments
 (0)