summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/services.inc
diff options
context:
space:
mode:
authorRoss Williams <ross@ross-williams.net>2016-11-29 22:14:36 -0500
committerRoss Williams <ross@ross-williams.net>2016-11-29 22:14:36 -0500
commitf0cce276a6c292ed23bb628c499989107f6b162e (patch)
tree7f7475f9d03fac21abcade7345d4ccdf85262e01 /src/etc/inc/services.inc
parent011f550d9b6d5980bd486af3254b387d3019783b (diff)
downloadpfsense-f0cce276a6c292ed23bb628c499989107f6b162e.zip
pfsense-f0cce276a6c292ed23bb628c499989107f6b162e.tar.gz
Put DDNS hostname config in the wrong place
It is relevant to the interface, not just the per-static-mapping DDNS config.
Diffstat (limited to 'src/etc/inc/services.inc')
-rw-r--r--src/etc/inc/services.inc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index aedd3c4..d52f553 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -1052,6 +1052,10 @@ EOD;
$dhhostname = str_replace(" ", "_", $sm['hostname']);
$dhhostname = str_replace(".", "_", $dhhostname);
$dhcpdconf .= " option host-name \"{$dhhostname}\";\n";
+ # TODO: Implement ddnsforcehostname option for DHCP Server per interface
+ if ((isset($dhcpifconf['ddnsupdate']) || isset($sm['ddnsupdate'])) && (isset($dhcpifconf['ddnsforcehostname']) || isset($sm['ddnsforcehostname']))) {
+ $dhcpdconf .= " ddns-hostname \"{$dhhostname}\";\n";
+ }
}
if ($sm['filename']) {
$dhcpdconf .= " filename \"{$sm['filename']}\";\n";
@@ -1079,12 +1083,6 @@ EOD;
if (($sm['ddnsdomain'] <> "") && ($sm['ddnsdomain'] != $dhcpifconf['ddnsdomain'])) {
$smdnscfg .= " ddns-domainname \"{$sm['ddnsdomain']}\";\n";
}
-# TODO: Implement ddnsforcehostname option for DHCP Server per interface
- if (isset($dhcpifconf['ddnsforcehostname']) && $sm['hostname']) {
- $ddnshostname = str_replace(" ", "_", $sm['hostname']);
- $ddnshostname = str_replace(".", "_", $ddnshostname);
- $smdnscfg .= " ddns-hostname \"{$ddnshostname}\";\n";
- }
$smdnscfg .= " ddns-update-style interim;\n";
}
OpenPOWER on IntegriCloud