Can't get class "match if" to actually match...

Peter Rathlev peter at rathlev.dk
Mon Apr 20 19:26:54 UTC 2015


Doh... I found the problem. I my hurry I had written

  substring(vendor-class-identifier, 0, 12)

instead of

  substring(option vendor-class-identifier, 0, 12)

On Fri, 2015-04-17 at 14:32 +0200, Peter Rathlev wrote:
> I can't get a "class" to actually match anything, and I'm not sure what
> I'm doing wrong.
...
>    class "Juniper-WLC" {
>      match if substring(vendor-class-identifier, 0, 12) = "WIRELESS-AP:";
>      if (config-option X-Juniper-AP-Options = "Juniper-AP-Cluster-2") {
>        log(info, "this message does not appear in the log");
>        # option Vendor-specific-information "ip:172.23.12.21,172.23.12.22,172.23.12.23,172.25.12.21,172.25.12.22";
>        option Vendor-specific-information "ip:172.23.12.21,172.23.12.22,172.23.12.23,172.25.12.21";
>      }
>    }

I'm not sure why it works inside a group, but strictly speaking it's an
error in syntax, so I'm not surprised it doesn't work as such.

After correcting this everything works as intended. :-) Sorry for the
noise.

-- 
Peter




More information about the dhcp-users mailing list