diff options
author | Will Boyce <me@willboyce.com> | 2013-06-16 08:57:48 +0100 |
---|---|---|
committer | Will Boyce <me@willboyce.com> | 2013-06-16 08:57:48 +0100 |
commit | 449f1dd2b24dfbb3ee25d290aac3260cc5b06e0b (patch) | |
tree | ae4951b34e15379f48fa7db5ba3894c11bbabdaa /usr/local/www/services_dhcp_edit.php | |
parent | e8ddd3a89a4513ab135c88739bd86cbb9fcd92c2 (diff) | |
download | pfsense-449f1dd2b24dfbb3ee25d290aac3260cc5b06e0b.zip pfsense-449f1dd2b24dfbb3ee25d290aac3260cc5b06e0b.tar.gz |
allow defining dhcp static mappings using dhcp-client-identifier
Diffstat (limited to 'usr/local/www/services_dhcp_edit.php')
-rwxr-xr-x | usr/local/www/services_dhcp_edit.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php index a66a360..c0cab72 100755 --- a/usr/local/www/services_dhcp_edit.php +++ b/usr/local/www/services_dhcp_edit.php @@ -92,6 +92,7 @@ if (isset($_POST['id'])) if (isset($id) && $a_maps[$id]) { $pconfig['mac'] = $a_maps[$id]['mac']; + $pconfig['cid'] = $a_maps[$id]['cid']; $pconfig['hostname'] = $a_maps[$id]['hostname']; $pconfig['ipaddr'] = $a_maps[$id]['ipaddr']; $pconfig['filename'] = $a_maps[$id]['filename']; @@ -111,6 +112,7 @@ if (isset($id) && $a_maps[$id]) { $pconfig['tftp'] = $a_maps[$id]['tftp']; } else { $pconfig['mac'] = $_GET['mac']; + $pconfig['cid'] = $_GET['cid']; $pconfig['hostname'] = $_GET['hostname']; $pconfig['filename'] = $_GET['filename']; $pconfig['rootpath'] = $_GET['rootpath']; @@ -138,8 +140,8 @@ if ($_POST) { $pconfig = $_POST; /* input validation */ - $reqdfields = explode(" ", "mac"); - $reqdfieldsn = array(gettext("MAC address")); + $reqdfields = array(); + $reqdfieldsn = array(); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -243,6 +245,7 @@ if ($_POST) { if (!$input_errors) { $mapent = array(); $mapent['mac'] = $_POST['mac']; + $mapent['cid'] = $_POST['cid']; $mapent['ipaddr'] = $_POST['ipaddr']; $mapent['hostname'] = $_POST['hostname']; $mapent['descr'] = $_POST['descr']; @@ -334,7 +337,7 @@ include("head.inc"); <td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCP Mapping");?></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td> + <td width="22%" valign="top" class="vncell"><?=gettext("MAC address");?></td> <td width="78%" class="vtable"> <input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>"> <?php @@ -347,6 +350,11 @@ include("head.inc"); <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ". "xx:xx:xx:xx:xx:xx");?></span></td> </tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Client identifier");?></td> + <td width="78%" class="vtable"> + <input name="cid" type="text" class="formfld unknown" id="cid" size="30" value="<?=htmlspecialchars($pconfig['cid']);?>"> + <span class="vexpl"><?=gettext("");?></span></td> + </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td> <td width="78%" class="vtable"> |