[kea-dev] Expressions in option-data
tomasz at isc.org
Thu Jan 21 22:41:54 UTC 2016
On 21.01.2016 18:46, Ola Thoresen wrote:
> Thanks for the reply.
> I see that
> is a start, however it seems a bit much to make a full "plugin" just to
> be able to name the bootfile dynamically based on the options provided
> from the dhcp-client (or relay)
Hear, hear. ISC DHCP didn't have all its fancy capabilities in its 1.0
release either :) The problem here is that ISC DHCP was developed over a
long period of time and the expressions, such as you mentioned, require
a code that is difficult to maintain and extend. One of the reasons to
develop Kea from scratch is that we want to avoid such long term
maintenance pains. You happen to want the hostname to be generated based
on remote-id, but there are people out there, who prefer IP address, MAC
address, circuit-it or any other piece of the packet for that matter.
This is more complicated that it make look like at the first glance.
We strongly believe that the way forward is to develop a number of hooks
libraries that users could mix and match as needed.
Having said all that, I fully understand your point. I think we may have
an opportunity here to develop simple hooks app that would do what you
want it to do. We could use existing client classification code that
essentially takes various options from the packet and evaluates it. It
currently is used to determine if the client belongs to a class or not,
but we could easily extend it to evaluate to a string. That string could
be then used to set an option name. The classification code does not
allow accessing relay options yet, but it's planned for the next
release. I need to think a bit more about this, but it seems very doable.
Do you want to do DNS update with that name or just the option values
sent back to the client?
> But I will look into it. It might open up other options that we have
> not thought of yet.
Please do. I'd love to hear your thoughts about this.
I will talk with the team and we'll see what we can do to make
implementation of such hooks easier.
More information about the kea-dev