mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
isc-dhcp: fix startup issues with RFC-1918 PTR RRs
If isc-dhcp gets restarted, it might have to deal with RFC-1918 zones being previously populated by an earlier instance. In that case, we need to know if we're modified versus initially adding the zones. The special handling of RFC-1918 zones in Bind is quirky, and there should be a patch soon to make it more friendly, but in the meantime you might have to use: disable-empty-zone 168.192.in-addr.arpa; Or similar depending on which address block you poach. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
@@ -11,7 +11,7 @@ PKG_NAME:=isc-dhcp
|
||||
UPSTREAM_NAME:=dhcp
|
||||
PKG_REALVERSION:=4.4.3-P1
|
||||
PKG_VERSION:=4.4.3_p1
|
||||
PKG_RELEASE:=13
|
||||
PKG_RELEASE:=14
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -154,7 +154,7 @@ EOF
|
||||
}
|
||||
|
||||
create_empty_zone() {
|
||||
local zone error zpath
|
||||
local zone error zpath command
|
||||
zone="$1"
|
||||
zpath="$dyndir/db.$zone"
|
||||
|
||||
@@ -167,7 +167,15 @@ create_empty_zone() {
|
||||
chown bind:bind "$zpath" || return 1
|
||||
chmod 0664 "$zpath" || return 1
|
||||
|
||||
if ! error=$(rndc modzone $zone "{
|
||||
# if the zone doesn't exist, we need to add it, otherwise we need to
|
||||
# create it.
|
||||
if ! rndc zonestatus $zone >/dev/null 2>&1; then
|
||||
command="addzone"
|
||||
else
|
||||
command="modzone"
|
||||
fi
|
||||
|
||||
if ! error=$(rndc $command $zone "{
|
||||
type primary;
|
||||
file \"$zpath\";
|
||||
update-policy {
|
||||
|
||||
Reference in New Issue
Block a user