proc local-address-p {addr} {
## Answer whether the ADDR is one of the host's addresses.
+ global env
- if {[catch { set sk [socket -server {} -myaddr $addr 0] }]} {
- return false
+ if {[info exists env(ZONECONF_LOCAL_ADDRESSES)]} {
+ if {[string match "*:$addr:*" ":$env(ZONECONF_LOCAL_ADDRESSES):"]} {
+ return true
+ } else {
+ return false
+ }
} else {
- close $sk
- return true
+ if {[catch { set sk [socket -server {} -myaddr $addr 0] }]} {
+ return false
+ } else {
+ close $sk
+ return true
+ }
}
}
"-Sfail" \
"-Wfail" \
"%z" "%f"]
+ define-list also-notify nil
define setvar {name value} {
dict set ZONECFG(var) $name $value
master {
puts $chan "\ttype master;"
puts $chan "\tfile \"$zone(server-file-name)\";"
+ if {![string equal $zone(also-notify) "nil"]} {
+ puts $chan "\talso-notify { [join $zone(also-notify) {; }]; };"
+ }
switch -exact -- $zone(type) {
dynamic {
write-ddns-update-policy "\t" $chan $config