mirror of
https://github.com/uklans/cache-domains
synced 2024-11-22 11:23:05 +00:00
Tell dnsmasq not to pass requests upstream (#223)
* Tell dnsmasq not to pass requests upstream The behavior of dnsmasq changed in version 2.86 -- before then, if a record was set for a domain name with dnsmasq, and a record for a type not specified for that domain was requested, dnsmasq would indicate no data existed for that record type. After 2.86, record types that are not specified are instead passed upstream. The latter behavior causes problems for, e.g., the Steam client, which will disregard a correctly set A-record for lancache.steamcontent.com, if no AAAA is set with dnsmasq and dnsmasq passes the AAAA query upstream. The documentation for dnsmasq indicates the correct way to restore the old behavior is to use the local=/host/ syntax -- emit this syntax for each of our lancache-hosted DNS entries. * Update scripts/create-dnsmasq.sh Co-authored-by: Amir Zarrinkafsh <nightah@me.com> --------- Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
This commit is contained in:
parent
257f009282
commit
31b2ba1e0a
1 changed files with 5 additions and 3 deletions
|
@ -52,10 +52,12 @@ while read -r entry; do
|
||||||
fi
|
fi
|
||||||
parsed=$(echo ${fileentry} | sed -e "s/^\*\.//")
|
parsed=$(echo ${fileentry} | sed -e "s/^\*\.//")
|
||||||
for i in ${cacheip}; do
|
for i in ${cacheip}; do
|
||||||
if grep -qx "address=/${parsed}/${i}" "${outputfile}"; then
|
if ! grep -qx "address=/${parsed}/${i}" "${outputfile}"; then
|
||||||
continue
|
|
||||||
fi
|
|
||||||
echo "address=/${parsed}/${i}" >> "${outputfile}"
|
echo "address=/${parsed}/${i}" >> "${outputfile}"
|
||||||
|
fi
|
||||||
|
if ! grep -qx "local=/${parsed}/" "${outputfile}"; then
|
||||||
|
echo "local=/${parsed}/" >> "${outputfile}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done <<< $(cat ${basedir}/${filename} | sort);
|
done <<< $(cat ${basedir}/${filename} | sort);
|
||||||
done <<< $(jq -r ".cache_domains[${entry}].domain_files[$fileid]" ${path})
|
done <<< $(jq -r ".cache_domains[${entry}].domain_files[$fileid]" ${path})
|
||||||
|
|
Loading…
Reference in a new issue