shithub: riscv

Download patch

ref: 46b4b99997dbac33c7c917dc40386e67fcb26438
parent: a70280308ae782ac422e78ccf19b221697116c1b
author: Jacob Moody <moody@posixcafe.org>
date: Sun Apr 21 14:20:30 EDT 2024

/sys/lib/dist/ndb: update root servers and add script to keep them updated

Also remove dnsdump as that feature is dead now.

--- a/sys/lib/dist/ndb/common
+++ b/sys/lib/dist/ndb/common
@@ -1,56 +1,4 @@
 #
-#	Root server hints
-#	https://www.internic.net/domain/named.root
-#
-
-#
-# real dns root server ips
-#
-dom=A.ROOT-SERVERS.NET ip=198.41.0.4
-dom=B.ROOT-SERVERS.NET ip=199.9.14.201
-dom=C.ROOT-SERVERS.NET ip=192.33.4.12
-dom=D.ROOT-SERVERS.NET ip=199.7.91.13
-dom=E.ROOT-SERVERS.NET ip=192.203.230.10
-dom=F.ROOT-SERVERS.NET ip=192.5.5.241
-dom=G.ROOT-SERVERS.NET ip=192.112.36.4
-dom=H.ROOT-SERVERS.NET ip=198.97.190.53		# dec 2015
-dom=I.ROOT-SERVERS.NET ip=192.36.148.17
-dom=J.ROOT-SERVERS.NET ip=192.58.128.30		# nov 2002
-dom=K.ROOT-SERVERS.NET ip=193.0.14.129
-dom=L.ROOT-SERVERS.NET ip=199.7.83.42		# nov 2007
-dom=M.ROOT-SERVERS.NET ip=202.12.27.33
-
-dom=A.ROOT-SERVERS.NET ip=2001:503:ba3e::2:30
-dom=B.ROOT-SERVERS.NET ip=2001:500:200::b
-dom=C.ROOT-SERVERS.NET ip=2001:500:2::c
-dom=D.ROOT-SERVERS.NET ip=2001:500:2d::d
-dom=E.ROOT-SERVERS.NET ip=2001:500:a8::e
-dom=F.ROOT-SERVERS.NET ip=2001:500:2f::f
-dom=H.ROOT-SERVERS.NET ip=2001:500:1::53	# dec 2015
-dom=I.ROOT-SERVERS.NET ip=2001:7fe::53
-dom=J.ROOT-SERVERS.NET ip=2001:503:c27::2:30
-dom=K.ROOT-SERVERS.NET ip=2001:7fd::1
-dom=L.ROOT-SERVERS.NET ip=2001:500:9f::42	# mar 2016
-dom=M.ROOT-SERVERS.NET ip=2001:dc3::35
-
-dom=a.gtld-servers.net ip=192.5.6.30
-dom=b.gtld-servers.net ip=192.33.14.30
-dom=c.gtld-servers.net ip=192.26.92.30
-dom=d.gtld-servers.net ip=192.31.80.30
-dom=e.gtld-servers.net ip=192.12.94.30
-dom=f.gtld-servers.net ip=192.35.51.30
-dom=g.gtld-servers.net ip=192.42.93.30
-dom=h.gtld-servers.net ip=192.54.112.30
-dom=i.gtld-servers.net ip=192.43.172.30
-dom=j.gtld-servers.net ip=192.48.79.30
-dom=k.gtld-servers.net ip=192.52.178.30
-dom=l.gtld-servers.net ip=192.41.162.30
-dom=m.gtld-servers.net ip=192.55.83.30
-
-dom=a.gtld-servers.net ip=2001:503:a83e::2:30
-dom=b.gtld-servers.net ip=2001:503:231d::2:30
-
-#
 # spam defense.  unfortunately, arin doesn't give negative
 # rcodes for these non-routable addresses.  we'll do it for them.
 #
--- a/sys/lib/dist/ndb/dnsdump
+++ /dev/null
@@ -1,3 +1,0 @@
-# dns debug
-# write "dump" to /net/dns
-# lots of output here
--- /dev/null
+++ b/sys/lib/dist/ndb/dnsroot
@@ -1,0 +1,27 @@
+# this file is autogenerated from /sys/lib/dist/ndb/mkfile
+dom=A.ROOT-SERVERS.NET ip=198.41.0.4
+dom=A.ROOT-SERVERS.NET ip=2001:503:ba3e:0:0:0:2:30
+dom=B.ROOT-SERVERS.NET ip=170.247.170.2
+dom=B.ROOT-SERVERS.NET ip=2801:1b8:10:0:0:0:0:b
+dom=C.ROOT-SERVERS.NET ip=192.33.4.12
+dom=C.ROOT-SERVERS.NET ip=2001:500:2:0:0:0:0:c
+dom=D.ROOT-SERVERS.NET ip=199.7.91.13
+dom=D.ROOT-SERVERS.NET ip=2001:500:2d:0:0:0:0:d
+dom=E.ROOT-SERVERS.NET ip=192.203.230.10
+dom=E.ROOT-SERVERS.NET ip=2001:500:a8:0:0:0:0:e
+dom=F.ROOT-SERVERS.NET ip=192.5.5.241
+dom=F.ROOT-SERVERS.NET ip=2001:500:2f:0:0:0:0:f
+dom=G.ROOT-SERVERS.NET ip=192.112.36.4
+dom=G.ROOT-SERVERS.NET ip=2001:500:12:0:0:0:0:d0d
+dom=H.ROOT-SERVERS.NET ip=198.97.190.53
+dom=H.ROOT-SERVERS.NET ip=2001:500:1:0:0:0:0:53
+dom=I.ROOT-SERVERS.NET ip=192.36.148.17
+dom=I.ROOT-SERVERS.NET ip=2001:7fe:0:0:0:0:0:53
+dom=J.ROOT-SERVERS.NET ip=192.58.128.30
+dom=J.ROOT-SERVERS.NET ip=2001:503:c27:0:0:0:2:30
+dom=K.ROOT-SERVERS.NET ip=193.0.14.129
+dom=K.ROOT-SERVERS.NET ip=2001:7fd:0:0:0:0:0:1
+dom=L.ROOT-SERVERS.NET ip=199.7.83.42
+dom=L.ROOT-SERVERS.NET ip=2001:500:9f:0:0:0:0:42
+dom=M.ROOT-SERVERS.NET ip=202.12.27.33
+dom=M.ROOT-SERVERS.NET ip=2001:dc3:0:0:0:0:0:35
--- a/sys/lib/dist/ndb/local
+++ b/sys/lib/dist/ndb/local
@@ -5,6 +5,7 @@
 	file=/net/ndb
 	file=/lib/ndb/local
 	file=/lib/ndb/common
+	file=/lib/ndb/dnsroot
 	file=/lib/ndb/dnschallenge
 
 #
--- /dev/null
+++ b/sys/lib/dist/ndb/mkfile
@@ -1,0 +1,9 @@
+dnsroot:V:
+	hget https://www.internic.net/domain/root.zone | awk '
+		BEGIN { print "# this file is autogenerated from /sys/lib/dist/ndb/mkfile" };
+		match($1, "\\.root-servers\\.net\\.") != 0 && \
+		($4 == "A" || $4 == "AAAA") {
+			dom = toupper($1);
+			sub("\\.$", "", dom);
+			printf("dom=%s ip=%s\n", dom, $5);
+		}' > $target