From 379e28880b99983e1677e61f77c0b056a97f1457 Mon Sep 17 00:00:00 2001 From: Daniel Gimpelevich Date: Wed, 17 Jan 2018 08:05:12 -0800 Subject: [PATCH] unbound: fix crash when using odhcpd w/o dnsmasq 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 --- net/unbound/Makefile | 2 +- net/unbound/files/odhcpd.awk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/unbound/Makefile b/net/unbound/Makefile index 58bcd4dfd..e414b038b 100644 --- a/net/unbound/Makefile +++ b/net/unbound/Makefile @@ -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 diff --git a/net/unbound/files/odhcpd.awk b/net/unbound/files/odhcpd.awk index 58f28d29a..fa2e41edf 100644 --- a/net/unbound/files/odhcpd.awk +++ b/net/unbound/files/odhcpd.awk @@ -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 ) ;