matchregion

Description

Returns true/false if specified region is matched. -item flag will return a TCL obj representing the matched object.
See the following article for details on how regions are matched: Matchregion Solution Article

Syntax

matchregion [-item] <ip|ldns> <region name>

Examples

when DNS_REQUEST {

    # Log some debug
    log local0. "[IP::client_addr]: [matchregion ldns internal_region]"
    log local0. "[IP::client_addr]: [matchregion [IP::client_addr] internal_region]"

    # Drop the query if client is not in the internal_region
    if {not [matchregion [IP::client_addr] internal_region]}{
        drop
    }
}