From: Arne Fitzenreiter Date: Fri, 7 Oct 2016 09:27:33 +0000 (+0200) Subject: unbound: skip green interface if ip was set to 1.1.1.1 X-Git-Tag: v2.19-core106~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d7ca700bd2c8eafbedf2261038496d4588bd5b7;p=ipfire-2.x.git unbound: skip green interface if ip was set to 1.1.1.1 this is a reserved marker for unused green ip. Signed-off-by: Arne Fitzenreiter --- diff --git a/src/initscripts/init.d/unbound b/src/initscripts/init.d/unbound index d324457d16..3b8beee248 100644 --- a/src/initscripts/init.d/unbound +++ b/src/initscripts/init.d/unbound @@ -112,7 +112,7 @@ update_forwarders() { own_hostname() { local hostname=$(hostname -f) - # 1.1.1.1 is reserved for green only, skip this + # 1.1.1.1 is reserved for unused green, skip this if [ -n "${GREEN_ADDRESS}" -a "${GREEN_ADDRESS}" != "1.1.1.1" ]; then unbound-control -q local_data "${hostname} ${LOCAL_TTL} IN A ${GREEN_ADDRESS}" fi @@ -148,7 +148,8 @@ write_interfaces_conf() { ( config_header - if [ -n "${GREEN_ADDRESS}" ]; then + # 1.1.1.1 is reserved for unused green + if [ -n "${GREEN_ADDRESS}" -a "${GREEN_ADDRESS}" != "1.1.1.1" ]; then echo "# GREEN" echo "interface: ${GREEN_ADDRESS}" echo "access-control: $(cidr ${GREEN_NETADDRESS} ${GREEN_NETMASK}) allow"