Hi, I'm attempting to create a mechanism that sets option 67 boot-file-name to a URL w/ the client's hostname as a URL param. I found that I needed to use the flex_option hook to do this. The following code works partially:
"hooks-libraries": [
{
"library": "/usr/lib64/kea/hooks/libdhcp_flex_option.so",
"parameters": {
"options": [
{
"code": 67,
"name": "boot-file-name",
"add": "ifelse( ( (substring(option[77].hex,0,4) == 'iPXE')
and (option[host-name].exists) ),
concat('http://x.x.x.x/ipxe.php?host=',option[host-name].text
<http://x.x.x.x/ipxe.php?host=%27,option[host-name].text>), '')"
}
]
}
}
],
If the DHCP client matches option 77 user-class with the string "iPXE" && the
DHCP client sends option 12 host-name, the URL is set w/ that client's
hostname. I need the same code to work with fixed address host entries. So, if
I have a host record created that reserves that client's IP address and
Hostname via the Mac address, I need that declared hostname to be passed in the
URL. I can't seen to find a way to do that. Again, if the client sends a value
for option 12, it works (fixed host record or not), but if it doesn't send
option 12 it does not.
When I use the host record - the server already knows the value for option 12
and returns it back to the client, and was thinking this SHOULD work. Anyone
have any ideas?
Thanks
DDI Guru
Patrick Piper
http://ddiguru.com <http://ddiguru.com/>
smime.p7s
Description: S/MIME cryptographic signature
-- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
