https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7266

--- Comment #2 from Curtis Villamizar <[email protected]> ---
Created attachment 5354
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5354&action=edit
patch to sa-update.raw

This is a simple patch.  It has two small block, both add code so diffs are an
easy read.

The first block runs check_mirror_af($mirror) and if it fails forms a dbg
message and does "next" to try a different mirror.

The second block adds the function check_mirror_af.  It uses the existing
$have_inet4 and $have_inet6 variables and the results of do_dns_query with RR
type A and AAAA.

This is efficient since it only checks the mirror picked, not all mirrors.  It
does at most one DNS query for each mirror rejected and one for the mirror
accepted.  If the host is dual stack (both v4 and v6) then at most two DNS
queries are done.  With only four mirrors the efficiency gain of doing the
check late is small.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to