@tmaestas is correct that there’s no way of preventing inheritance for most options. (There are a few odd cases where adding one option blocks inheritance of a different option, but that’s not what we’re talking about.)
The main challenge with implementing inheritance blocking is that ISC DHCP and BIND have their own inheritance models, and they don’t provide consistent and complete (or in some cases, any) mechanisms for blocking inheritance. Integrity can always add “more inheritance” to those services’ configurations, never less. To give users predictable, consistent, granular blocking of inheritance, we’d need the notion of “disable inheritance globally” in those services.
IIRC, in this case the inheritance IS coming from Integrity, so that specific excuse doesn’t apply here. 🤷
To @rharolde’s question, what I’ve tried is rolling my own “Allow Any” class, and that seemed to work for the use case as I understand it: exclusive Allow on a Block, permissive Allow on a Network under that Block.
- Create DHCP Match Class called (e.g.)
anyone: - Match Statement:
Custom Match If - Boolean Expression:
1=1 (or 0=0, depending on your temperament)
- On your open network(s), add
Allow Class Members of and select anyone.
Both the (inherited) restrictive and open allow members of statements are deployed; the more permissive “wins.” Multiple allow statements are supported in Integrity and ISC DHCP and should work predictably.
Of extremely minor academic interest only:
You may wonder why 1=1 instead of true. You’ll find that true doesn’t work (i.e. doesn’t match)... and it also doesn’t cause an error. Further, you’ll find that any arbitrary word, e.g. meow, exhibits the same behaviour. In this dhcp-eval context, true (or, you know, meow) isn’t a known constant or a reserved word, it’s simply taken as a variable binding, and the variable true isn’t defined, so it evaluates as false. If you define it (which I’m not recommending), it works:
set true = (1 = 1);
class "anyone"
{
match if true;
}