A Syntax issue with match

Bruce Hudson Bruce.Hudson at Dal.Ca
Thu Nov 18 21:08:15 UTC 2010


> class "and-test" {
> match if substring (option host-name,0,6) = "ABCDEF";
> & substring (hardware,0,4) = 1:aF:A5:A4;
> }

The dhcp-eval man page refers to "boolean-expr-1 and boolean-expr-2" so
the obvious (although untested) answer is:

    class "and-test" {
        match if ((substring (option host-name,0,6) = "ABCDEF") and
		(substring (hardware,0,4) = 1:AF:A5:A4));
    }
 
This may have more parentheses than strictly required.
--
Bruce A. Hudson				| Bruce.Hudson at Dal.CA
ITS, Networks and Systems		|
Dalhousie University			|
Halifax, Nova Scotia, Canada		| (902) 494-3405



More information about the dhcp-users mailing list