The first byte of QUIC packets is in the [64,127] range.

sieve-cache
Frank Denis 9 months ago
parent 5a95346c52
commit 5c4c6c181e

@ -214,7 +214,12 @@ async fn handle_client_query(
.await .await
} }
Ok(None) => return Ok(()), Ok(None) => return Ok(()),
Err(_) => bail!("Unencrypted query or QUIC protocol"), Err(_) => {
if !packet.is_empty() && (64..=127).contains(&packet[0]) {
bail!("Likely a QUIC packet") // RFC 9443
}
bail!("Unencrypted query or different protocol")
}
}; };
} }
}; };

Loading…
Cancel
Save