xowf::IpRange method allow_access (public)
<instance of xowf::IpRange> allow_access ip
Defined in packages/xowf/tcl/iprange-procs.tcl
Check, if provided IP address is in the provided ranges of disallowed or allowed addresses. First, the explicitly disallowed addresses are checked, then the explicitly allowed ones. Addresses can be specified in the following formats:
- IP address in CIDR format (e.g., 127.208.0.0/16)
- IP address containing wildcard "*"
- literal IP address
- Parameters:
- ip (required)
- Returns:
- boolean value expressing success
- Testcases:
- No testcase defined.
Source code: foreach spec ${:disallowed} { if {[:match $spec $ip]} { return 0 } } foreach spec ${:allowed} { if {[:match $spec $ip]} { return 1 } } return 0XQL Not present: Generic, PostgreSQL, Oracle