feat(resolver): filter_aaaa for IPv4-only networks #119

Merged
razvandimescu merged 7 commits from feat/filter-aaaa into main 2026-04-19 12:31:28 +08:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit d6bb9a0f01 - Show all commits

View File

@@ -1285,7 +1285,9 @@ mod tests {
(1, vec![0x02, b'h', b'3']),
(
6,
vec![0x26, 0x06, 0x47, 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01],
vec![
0x26, 0x06, 0x47, 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01,
],
),
],
);
@@ -1342,7 +1344,9 @@ mod tests {
&[],
&[(
6,
vec![0x26, 0x06, 0x47, 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01],
vec![
0x26, 0x06, 0x47, 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01,
],
)],
);

View File

@@ -84,11 +84,7 @@ pub fn strip_ipv6hint(rdata: &[u8]) -> Option<Vec<u8>> {
/// (key, value) param pairs. Shared by `svcb` unit tests and `ctx`
/// pipeline tests that need to seed the cache with a synthetic HTTPS RR.
#[cfg(test)]
pub(crate) fn build_rdata(
priority: u16,
target: &[&str],
params: &[(u16, Vec<u8>)],
) -> Vec<u8> {
pub(crate) fn build_rdata(priority: u16, target: &[&str], params: &[(u16, Vec<u8>)]) -> Vec<u8> {
let mut out = Vec::new();
out.extend_from_slice(&priority.to_be_bytes());
for label in target {