Hello Craig,

Craig Small schrieb/wrote:
> The problem is the format of that root.ds has changed. My work-around
> was to change line 115 of /etc/init.d/dnsmasq
> 
>    DNSMASQ_OPTS="$DNSMASQ_OPTS `sed -e 
> s/".\t[0-9]*\tIN\tDS\t"/--trust-anchor=.,/ -e s/" "/,/g $ROOT_DS | tr '\n' ' 
> '`"

Thanks a lot for fixing it! I did take up and hammered your patch to make it
work with both old and new version of dns-root-data.

patch attached.

Does '/usr/share/dnsmasq-base/trust-anchors.conf' also need an update?


Also attached old and new root.ds files, for ease of testing. Both are plain
copies from the .deb .


kind regards,

     Thilo

.       172800  IN      DS      19036 8 2 
49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
.       172800  IN      DS      20326 8 2 
e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d

Attachment: root.ds.old
Description: application/trash

--- etc/init.d/dnsmasq.orig	2017-03-25 11:57:30.921943573 +0000
+++ etc/init.d/dnsmasq	2017-03-25 11:57:30.769940837 +0000
@@ -110,9 +110,9 @@
 
 ROOT_DS="/usr/share/dns/root.ds"
 
 if [ -f $ROOT_DS ]; then
-   DNSMASQ_OPTS="$DNSMASQ_OPTS `sed -e s/". IN DS "/--trust-anchor=.,/ -e s/" "/,/g $ROOT_DS | tr '\n' ' '`"
+   DNSMASQ_OPTS="$DNSMASQ_OPTS $(cat $ROOT_DS | tr '[:blank:]' '\t' | cut -f4- | sed 's#^[A-Z]\+\s\+## ; s#^#--trust-anchor=.,# ; s:[ \t]\+:,:g' | paste -s -d ' ')"
 fi
 
 start()
 {

Reply via email to