[prev in list] [next in list] [prev in thread] [next in thread]
List: dhcp-users
Subject: Re: Class membership
From: Simon Hobson <dhcp1 () thehobsons ! co ! uk>
Date: 2015-10-17 6:55:23
Message-ID: 3EAA6938-6E0B-4C78-B529-F9117D0D42BE () thehobsons ! co ! uk
[Download RAW message or body]
Patrick Trapp <ptrapp@nex-tech.com> wrote:
> Am I correct in thinking that I can refer to the class as a whole in addition to \
> the individual subclasses? So given class A with subclass 1A and subclass 2A, I \
> could use an allow statement against class A, subclass 1A, or subclass 2A (or \
> potentially some silly combination thereof)?
No, they don't work like that. The subclasses don't have names, and you can't refer \
to them. If you look at the example, it's simply a quick and efficient method to \
provide a list of members - so I suppose "subclass" is perhaps a slightly misleading \
name.
If you read down the man page a bit, you'll find there are other things you can do. \
IIRC the example given is to spawn a subclass based on end-user port (ie option 82) - \
and apply restrictions per subclass (eg only 3 DHCP leases at any time). But you \
still cannot refer to any individual subclass by name.
I have no idea how much work it would be to allow a class to be defined by reference \
to another class membership. I suspect it would be a lot since it's come up before.
One stumbling block I could see (as a non-programmer) is that the config is object \
based and there is no defined execution order (ie putting one declaration ahead of \
another in the config file does not mean it'll be executed first) - so you'd need to \
introduce some ordering to class membership evaluation to ensure that the referenced \
classes were evaluated for membership priot to other classes that use that \
information. I suspect this is "non trivial".
_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic