a couple of match questions
Peter Rathlev
peter at rathlev.dk
Thu Sep 20 17:01:29 UTC 2012
On Thu, 2012-09-20 at 11:46 -0400, Adam Moffett wrote:
> 1) Is it possible to match on (non)membership of another class?
> eg:
> class "foo" {
> match if ((some condition) and not (member of class "xyz"));
> ...
> }
> I'm guessing no, because I seem to recall some discussion about match
> statements not being evaluated in any certain order.
My guess is no. The "member of" construct does not seem to exist in that
context. Perusing the source code seems to confirm this
>
> 2) Is it possible to match the lack of option 82 information?
> eg:
> class "foo" {
> match if ((some condition) and (option agent.circuit-id=NULL));
> ...
> }
For this you can use "exists" cf. man dhcp-eval. Something like
match if ((some condition) and (not exists option agent.circuit-id))
I haven't tested it though.
--
Peter
More information about the dhcp-users
mailing list