Merge pull request #8849 from EricLuehrsen/unbound_dhcp_master
unbound: fix local dns synthesis corner cases
This commit is contained in:
commit
90c8e9d684
3 changed files with 8 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=unbound
|
PKG_NAME:=unbound
|
||||||
PKG_VERSION:=1.9.1
|
PKG_VERSION:=1.9.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.unbound.net/downloads
|
PKG_SOURCE_URL:=https://www.unbound.net/downloads
|
||||||
|
|
|
@ -36,10 +36,12 @@
|
||||||
sub( /.*\//, "", cdr ) ;
|
sub( /.*\//, "", cdr ) ;
|
||||||
sub( /\/.*/, "", adr2 ) ;
|
sub( /\/.*/, "", adr2 ) ;
|
||||||
sub( /.*\//, "", cdr2 ) ;
|
sub( /.*\//, "", cdr2 ) ;
|
||||||
|
gsub( /_/, "-", hst ) ;
|
||||||
|
|
||||||
|
|
||||||
if ( hst !~ /^[[:alnum:]]([-[:alnum:]]*[[:alnum:]])?$/ ) {
|
if ( hst !~ /^[[:alnum:]]([-[:alnum:]]*[[:alnum:]])?$/ ) {
|
||||||
# that is not a valid host name (RFC1123)
|
# that is not a valid host name (RFC1123)
|
||||||
|
# above replaced common error of "_" in host name with "-"
|
||||||
hst = "-" ;
|
hst = "-" ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +50,7 @@
|
||||||
# TODO: this might be better with a substituion option,
|
# TODO: this might be better with a substituion option,
|
||||||
# or per DHCP pool do-not-DNS option, but its getting busy here.
|
# or per DHCP pool do-not-DNS option, but its getting busy here.
|
||||||
fqdn = net
|
fqdn = net
|
||||||
fqdn = sub( /\./, "-", fqdn ) ;
|
gsub( /\./, "-", fqdn ) ;
|
||||||
fqdn = tolower( hst "." fqdn "." domain ) ;
|
fqdn = tolower( hst "." fqdn "." domain ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +88,7 @@
|
||||||
|
|
||||||
while ( ( cmd | getline adr ) > 0 ) {
|
while ( ( cmd | getline adr ) > 0 ) {
|
||||||
if (( substr( adr, 1, 5 ) <= "fdff:" ) \
|
if (( substr( adr, 1, 5 ) <= "fdff:" ) \
|
||||||
|
&& ( index( adr, "::/" ) != 0 ) \
|
||||||
&& ( index( adr, "anycast" ) == 0 ) \
|
&& ( index( adr, "anycast" ) == 0 ) \
|
||||||
&& ( index( adr, "via" ) == 0 )) {
|
&& ( index( adr, "via" ) == 0 )) {
|
||||||
# GA or ULA routed addresses only (not LL or MC)
|
# GA or ULA routed addresses only (not LL or MC)
|
||||||
|
|
|
@ -112,10 +112,11 @@ bundle_all_networks() {
|
||||||
|
|
||||||
bundle_lan_networks() {
|
bundle_lan_networks() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
local ifsubnet ifname ifdashname ignore
|
local interface ifsubnet ifname ifdashname ignore
|
||||||
|
|
||||||
config_get_bool ignore "$cfg" ignore 0
|
config_get_bool ignore "$cfg" ignore 0
|
||||||
network_get_device ifname "$cfg"
|
config_get interface "$cfg" interface ""
|
||||||
|
network_get_device ifname "$interface"
|
||||||
ifdashname="${ifname//./-}"
|
ifdashname="${ifname//./-}"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue