• Eric Orth's avatar
    Fix TTL parsing for negative DNS responses · 55d10c65
    Eric Orth authored
    As was previously only done for address results, also allow non-address
    results to read a TTL from SOA records for NXDOMAIN and NODATA
    responses. This allows negative non-address results to be cached (but
    only for the non-transient NXDOMAIN and NODATA cases).
    
    For both address and non-address negative response parsing, do not read
    any TTLs unless an SOA record is present.  But if an SOA record is
    present, still allow using the min TTL between that record and any other
    parsed records present (e.g. CNAME records that are still valid to be
    present in an NXDOMAIN response).
    
    Fixed: 1121785
    Change-Id: I200f45b60c30d89ee53e45fa2cdb70302b617c09
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446016
    Commit-Queue: Eric Orth <ericorth@chromium.org>
    Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#813965}
    55d10c65
dns_fuzz_stub.cc 6 KB