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 /etc/inc | |
parent | e8ddd3a89a4513ab135c88739bd86cbb9fcd92c2 (diff) | |
download | pfsense-449f1dd2b24dfbb3ee25d290aac3260cc5b06e0b.zip pfsense-449f1dd2b24dfbb3ee25d290aac3260cc5b06e0b.tar.gz |
allow defining dhcp static mappings using dhcp-client-identifier
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/services.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 23026bd..680e80c 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -764,11 +764,14 @@ EOD; $i = 0; foreach ($dhcpifconf['staticmap'] as $sm) { - $dhcpdconf .= <<<EOD -host s_{$dhcpif}_{$i} { - hardware ethernet {$sm['mac']}; + $dhcpdconf .= "host s_{$dhcpif}_{$i} {\n"; + + if ($sm['mac']) + $dhcpdconf .= " hardware ethernet {$sm['mac']};\n"; + + if ($sm['cid']) + $dhcpdconf .= " option dhcp-client-identifier \"{$sm['cid']}\";\n"; -EOD; if ($sm['ipaddr']) $dhcpdconf .= " fixed-address {$sm['ipaddr']};\n"; |