Skip to content

get-root.sh bug.... on old Debian, anyway, it'll redownload the root zone every time #1

@JamesB7

Description

@JamesB7

Hello,

I can't speak for other operating systems (I'm running the fairly old Debian 9.6, perhaps), but in get-root.sh, I found that:

FILE_SOA=$(/usr/bin/awk '/^.\s/ { if ($4 == "SOA") { print $7; exit } }' ${OUTFILE} )

did not work. It was matching a line about aaa. and not root. This fixed it:

FILE_SOA=$(/usr/bin/awk '/^.+\s/ { if ($4 == "SOA") { print $7; exit } }' ${OUTFILE} )

Without this line, it downloads the root zone every time, because FILE_SOA is blank.

Also,

if [ x${FILE_SOA} = x${ROOT_SOA} ]; then

did not work. It said it was an unknown operator. Again, it may be the old Debian version. Instead I used:

if [ "${FILE_SOA}" = "${ROOT_SOA}" ]; then

This script is kind of a neat idea though. It hadn't occurred to me that the root zone is small enough it could just be kept around on a computer. It's too bad there's no way to check "SOA changed but nothing else", because surely that'd be the case almost every day. Are there any records in the root zone that could stand as a hash or marker of everything past the SOA and perhaps the DNSSEC? If such a thing existed, I wonder if you could use a tiny TCP receive buffer to prevent the root server from sending more data, read only the first kilobyte or so, and if that hash matched, disconnect the TCP connection and patch only that first kilobyte. 2MB/day could probably become 1KB/day most days. shrug Anyway, thanks for making this.

Have a blessed day :)

James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions