Forum Discussion

s3s1277_111291's avatar
s3s1277_111291
Icon for Nimbostratus rankNimbostratus
Jan 24, 2013

Issue with class match

on version 10.2 LTM, I am trying to add this irule and its' failing with below error. i have no doubt i am missing something very simple. can someone help?

 

error: line 3: [can't find value_list] [class match $srcip equals class1

 

b class class1 list

 

class class1 {

 

{

 

host 10.1.1.1

 

host 10.1.1.2

 

}

 

}

 

 

when CLIENT_ACCEPTED {

 

set srcip [IP::client_addr]

 

if { ! [class match $srcip equals class1] } {

 

pool pool1

 

log local0. "$srcip didnt match."

 

}

 

else {

 

log local0. "$srcip matched."

 

pool pool2

 

}

 

}

 

 

error: line 3: [can't find value_list] [class match $srcip equals class1

 

4 Replies

  • I'm not sure it's a good idea to call a class class1, I'd suggest you rename it! If that doesn't make a difference, remove the variable throughout, for example, for the first line;

    
    if { not [class match [IP::client_addr] equals source-ips] } {
    ...
    
  • Thanks for the reply. I tried both. Renaming the class, and also not using variable. And still got the same error.

     

  • class class1 {

     

    {

     

    host 10.1.1.1

     

    host 10.1.1.2

     

    }

     

    }

     

     

    try this

     

    class class1

     

    {

     

    host 10.1.1.1

     

    host 10.1.1.2

     

    }