PCP::reject

Description

This command provides the ability to cause a PCP (Port Control Protocol) reqeust to fail based on processing in the iRule. If the reject command is issued, the PCP request is rejected with the specified result code and no other action is taken by the PCP proxy.

Syntax

PCP::reject <result_code>

PCP::reject <result_code>

  • result_code is an integer field between 0 and 255 and is required

Examples

when PCP_REQUEST {
     if {[PCP::request opcode] == "map" &&
             [PCP::request internal-port] == 22] } {
         log "Rejecting PCP request to map SSH"
         PCP::reject 1
    }
}