A Syntax issue with match

Frank Bulk frnkblk at iname.com
Mon Jun 13 13:24:31 UTC 2011


Just a continuation of this topic.

The following fails. Anyone know why?

if (option dhcp-message-type = 1 or option dhcp-message-type = 3) and exists
agent.circuit-id and substring(option agent.remote-id, 0, 3) = "Ont"
{
        log ( info, concat( "OPTION-82 for ",
        binary-to-ascii (10, 8, ".",leased-address)," from ",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 1, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 2, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 3, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 4, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 5, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 6, 1))),2),
        " Agent ID (ONT): " , (option agent.remote-id)));
}

Here's the log:

Jun 13 09:15:47 199.120.69.22 dhcpd: Internet Systems Consortium DHCP Server
V3.1.3
Jun 13 09:15:47 199.120.69.22 dhcpd: Copyright 2004-2009 Internet Systems
Consortium.
Jun 13 09:15:47 199.120.69.22 dhcpd: All rights reserved.
Jun 13 09:15:47 199.120.69.22 dhcpd: For info, please visit
https://www.isc.org/software/dhcp/
Jun 13 09:15:47 199.120.69.22 dhcpd: /replicated/etc/dhcpd.conf line 302:
left brace expected.
Jun 13 09:15:47 199.120.69.22 dhcpd: if (option dhcp-message-type = 1 or
option dhcp-message-type = 3) and
Jun 13 09:15:47 199.120.69.22 dhcpd:
^
Jun 13 09:15:47 199.120.69.22 dhcpd: /replicated/etc/dhcpd.conf line 319:
expecting a declaration
Jun 13 09:15:47 199.120.69.22 dhcpd: }
Jun 13 09:15:47 199.120.69.22 dhcpd: ^
Jun 13 09:15:47 199.120.69.22 dhcpd: /replicated/etc/dhcpd.conf line 338:
expecting a declaration
Jun 13 09:15:47 199.120.69.22 dhcpd: }
Jun 13 09:15:47 199.120.69.22 dhcpd: ^

Frank

-----Original Message-----
From: dhcp-users-bounces+frnkblk=iname.com at lists.isc.org
[mailto:dhcp-users-bounces+frnkblk=iname.com at lists.isc.org] On Behalf Of
Simon Hobson
Sent: Friday, November 19, 2010 1:22 PM
To: Users of ISC DHCP
Subject: Re: A Syntax issue with match

Martin McCormick wrote:

>  > What happens if you use the three letters "and" instead of "&" ?
>
>Oh man!  It looks like that was the problem.

Don't worry - who hasn't been in that situation, tearing your hair 
out because you are just too close to the problem to spot the obvious 
mistake ?

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users




More information about the dhcp-users mailing list