mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(proptest): don't use port 53 for non-dns packets (#7129)
For simplicity sake I assumed that any packet using port 53 would be a dns packet, but I forgot to exclude it from the range of possible ports used. This can cause spurious CI failures
This commit is contained in:
@@ -222,7 +222,7 @@ where
|
||||
src.prop_map(Into::into),
|
||||
dst.prop_map(Into::into),
|
||||
any::<u16>(),
|
||||
any::<u16>(),
|
||||
non_dns_ports(),
|
||||
any::<sample::Selector>(),
|
||||
any::<u64>(),
|
||||
)
|
||||
@@ -250,7 +250,7 @@ where
|
||||
src.prop_map(Into::into),
|
||||
dst.prop_map(Into::into),
|
||||
any::<u16>(),
|
||||
any::<u16>(),
|
||||
non_dns_ports(),
|
||||
any::<sample::Selector>(),
|
||||
any::<u64>(),
|
||||
)
|
||||
@@ -265,6 +265,13 @@ where
|
||||
})
|
||||
}
|
||||
|
||||
fn non_dns_ports() -> impl Strategy<Value = u16> {
|
||||
any::<u16>().prop_filter(
|
||||
"avoid using port 53 for non-dns queries for simplicity",
|
||||
|p| *p != 53,
|
||||
)
|
||||
}
|
||||
|
||||
/// Samples up to 5 DNS queries that will be sent concurrently into connlib.
|
||||
pub(crate) fn dns_queries(
|
||||
domain: impl Strategy<Value = DomainName>,
|
||||
|
||||
Reference in New Issue
Block a user