]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
unbound: skip green interface if ip was set to 1.1.1.1
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 7 Oct 2016 09:27:33 +0000 (11:27 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 7 Oct 2016 09:27:33 +0000 (11:27 +0200)
this is a reserved marker for unused green ip.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/init.d/unbound

index d324457d163e7294c362eff7f052ea11a783b3a7..3b8beee24826526de78aa81f44bed3151aaa673a 100644 (file)
@@ -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"