--- HEAD/etc/inc/services.inc	2007-11-06 13:43:38.000000000 -0500
+++ HEAD/etc/inc/services.inc.dyndns	2007-12-05 13:21:39.000000000 -0500
@@ -939,7 +939,10 @@
 			fclose($fd);
 
 			/* generate update instructions */
-			$upinst = "update delete {$config['dnsupdate']['host']} A\n";
+			$upinst = ""
+			if (!empty($config['dnsupdate']['server']))
+				$upinst .= "server {$config['dnsupdate']['server']}\n";
+			$upinst .= "update delete {$config['dnsupdate']['host']} A\n";
 			$upinst .= "update add {$config['dnsupdate']['host']} {$config['dnsupdate']['ttl']} A {$wanip}\n";
 			$upinst .= "\n"; /* mind that trailing newline! */
 
--- HEAD/usr/local/www/services_dyndns.php	2007-02-06 22:42:27.000000000 -0500
+++ HEAD/usr/local/www/services_dyndns.php.dyndns	2007-12-05 13:16:59.000000000 -0500
@@ -53,6 +53,7 @@
 $pconfig['dnsupdate_keytype'] = $config['dnsupdate']['keytype'];
 if (!$pconfig['dnsupdate_keytype'])
 	$pconfig['dnsupdate_keytype'] = "zone";
+$pconfig['dnsupdate_server'] = $config['dnsupdate']['server'];
 $pconfig['dnsupdate_usetcp'] = isset($config['dnsupdate']['usetcp']);
 
 if ($_POST) {
@@ -110,6 +111,7 @@
 		$config['dnsupdate']['keyname'] = $_POST['dnsupdate_keyname'];
 		$config['dnsupdate']['keytype'] = $_POST['dnsupdate_keytype'];
 		$config['dnsupdate']['keydata'] = $_POST['dnsupdate_keydata'];
+		$config['dnsupdate']['server'] = $_POST['dnsupdate_server'];
 		$config['dnsupdate']['usetcp'] = $_POST['dnsupdate_usetcp'] ? true : false;
 
 		write_config();
@@ -151,6 +153,7 @@
 	document.iform.dnsupdate_keytype[1].disabled = endis;
 	document.iform.dnsupdate_keytype[2].disabled = endis;
 	document.iform.dnsupdate_keydata.disabled = endis;
+	document.iform.dnsupdate_server.disabled = endis;
 	document.iform.dnsupdate_usetcp.disabled = endis;
 }
 //-->
@@ -291,6 +294,12 @@
                     Paste an HMAC-MD5 key here.</td>
                 </tr>
                 <tr>
+                  <td width="22%" valign="top" class="vncellreq">Server</td>
+                  <td width="78%" class="vtable">
+                    <input name="dnsupdate_server" type="text" class+"formfld" id="dnsupdate_server" size="30" value="<?=htmlspecialchars($pconfig['dnsupdate_server'])?>">
+                  </td>
+                </tr>
+                <tr>
                   <td width="22%" valign="top" class="vncellreq">Protocol</td>
                   <td width="78%" class="vtable">
                     <input name="dnsupdate_usetcp" type="checkbox" id="dnsupdate_usetcp" value="yes" <?php if ($pconfig['dnsupdate_usetcp']) echo "checked=\"checked\""; ?> />
