Client identifier Option
Chuck Anderson
cra at WPI.EDU
Wed Jun 3 12:23:18 UTC 2009
On Wed, Jun 03, 2009 at 04:05:31PM +0530, pat wrote:
> { match if substring (option dhcp-client-identifier, 6, 12) =”\0abc.com” ;}
>
> But the problem is identifying the various address allocation classes in the
> server using a substring match at character postions will cause problems
> with variable length user names. Is there a way to match anything after
> the "@"? using a regular expression, maybe?
"suffix" might be what you want:
suffix (data-expr, length)
The suffix operator evaluates data-expr and returns the last length
bytes of the result of that evaluation. Length is a numeric expres-
sion. If data-expr or length evaluate to null, then the result is
also null. If suffix evaluates to a number greater than the length
of the evaluated data, then the evaluated data is returned.
{ match if suffix (option dhcp-client-identifier, 8) =”\0abc.com” ;}
More information about the dhcp-users
mailing list