For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Svevak_211593's avatar
Svevak_211593
Icon for Nimbostratus rankNimbostratus
Feb 26, 2016

error: [undefined procedure: default][default]

HI,

can you help me correcting following codeblock?

 

when CLIENT_ACCEPTED {
    if { [class match [IP::client_addr] equals datagroup-ntvSamsungSmartTVApp] } then {
        pool datagroup-ntvSamsungSmartTVApp
    } else {
        switch -exact -- [whereis [IP::client_addr] country] {
            "DE" -
            "AT" -
            "CH" -
            "LI" -
            "LU" - {
                pool webclips-http-dsr-pool
            } 
            default {
            reject
            }
        }
    }
}

 

I get this error: error: /Common/irule-geoblocking_whitelist:13: error: [undefined procedure: default][default]

 

2 Replies

  • Hi Sevevak,

     

    the problem with this code is the additional - sign after "LU". The - sign (seperator) is just required between multi-conditions, but not before the first and after the last condition...

     

    when CLIENT_ACCEPTED {
        if { [class match [IP::client_addr] equals datagroup-ntvSamsungSmartTVApp] } then {
            pool datagroup-ntvSamsungSmartTVApp
        } else {
            switch -exact -- [whereis [IP::client_addr] country] {
                "DE" -
                "AT" -
                "CH" -
                "LI" -
                "LU" {
                    pool webclips-http-dsr-pool
                } 
                default {
                    reject
                }
            }
        }
    }
    

     

    Cheers, Kai

  • Try:

     

    when CLIENT_ACCEPTED {
        if { [class match [IP::client_addr] equals datagroup-ntvSamsungSmartTVApp] } then {
            pool datagroup-ntvSamsungSmartTVApp
        } else {
            switch -exact -- [whereis [IP::client_addr] country] {
                "DE" -
                "AT" -
                "CH" -
                "LI" -
                "LU" {
                    pool webclips-http-dsr-pool
                } 
                default {
                reject
                }
            }
        }
    }