To add some filter rules in conf file
Glenn Satchell
Glenn.Satchell at uniq.com.au
Thu Nov 5 22:57:07 UTC 2009
This is dhcpd, not perl. There is no regular expression pattern
matching. Suggested reading is the man pages for dhcpd.conf,
dhcp-eval, dhcp-options.
regards,
-glenn
>From: Ashmath Khan <hashmat.email at gmail.com>
>Date: Thu, 5 Nov 2009 20:38:46 +0530
>Subject: Re: To add some filter rules in conf file
>
> I tried this:
> class "rule3"
> {
>
> match if option vendor-class-identifier ~= ".*" and not (option
> vendor-class-identifier ~= ".*MSFT.*") and not (not exists
> vendor-class-identifier) and not (option nwip-domain ~= "str.?");
> }
>
> This doesn't work. It should have assigned a lease. vendor-class-identifier
> has data "NSFT5.0".
> There is no option sent nwip-domain in discover packet. And when I remove
> this from match, it works!
> [~= is for regular expressions ]
>
> what could be the issue here ? This was working fine when I used substring,
> but with RE, it doesn't seem to work. Looks like the option which is not
> present, the RE doesn't apply. But again its confusing because:
> class "rule2"
> {
>
> match if option nwip-domain ~= "str.?" and not (option
> vendor-class-identifier ~= ".*MSFT.*") and not (not exists
> vendor-class-identifier);
> }
> This works meaning there is no lease assigned from this pool. It means the
> first RE evaluated to 'false'. And so 'not (option nwip-domain ~= "str.?")'
> should evaluate to true.
>
> thanks
> Ashmath
More information about the dhcp-users
mailing list