cidr_contains

Function

ArgDescriptionType
ipAn IP addressstring (required)
rangesA list of CIDR notation network rangeslist of string (required)

Description

Calculates if an IP address falls within a range of CIDR specified networks.

SELECT cidr_contains(ip="192.168.0.132", ranges=[
    "192.168.0.0/24", "127.0.0.1/8"])
FROM scope()