unbound: fix crash when using odhcpd w/o dnsmasq
authorDaniel Gimpelevich <redacted>
Wed, 17 Jan 2018 16:05:12 +0000 (08:05 -0800)
committerDaniel Gimpelevich <redacted>
Thu, 18 Jan 2018 12:22:12 +0000 (04:22 -0800)
When using the configuration under "Unbound and odhcpd" in the package's
README.md, the scripts generated a malformed config file for unbound, due
to an "ip route" command giving extra output lines with the string
"anycast" where the awk script expects an address. These are now filtered.

Signed-off-by: Daniel Gimpelevich <redacted>
net/unbound/Makefile
net/unbound/files/odhcpd.awk

index 58bcd4dfd3ce3b5398f581c6820585678b06e9cb..e414b038bf47e0c29c887c58037e54c68260013d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.6.7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 58f28d29a75aba9a8a27c8a09aca0878d385d606..fa2e41edfc88de422ade0ae7cc3bdacee6b483b6 100644 (file)
@@ -87,6 +87,7 @@
 
         while ( ( cmd | getline adr ) > 0 ) {
           if (( substr( adr, 1, 5 ) <= "fd00:" ) \
+          && ( index( adr, "anycast" ) == 0 ) \
           && ( index( adr, "via" ) == 0 )) {
             # GA or ULA routed addresses only (not LL or MC)
             sub( /\/.*/, "", adr ) ;
git clone https://git.99rst.org/PROJECT