diff options
Diffstat (limited to 'net/unbound/files/iptools.sh')
-rw-r--r-- | net/unbound/files/iptools.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/unbound/files/iptools.sh b/net/unbound/files/iptools.sh index 346e4e59d..f25265d0f 100644 --- a/net/unbound/files/iptools.sh +++ b/net/unbound/files/iptools.sh @@ -82,7 +82,7 @@ domain_ptr_ip4() { ############################################################################## host_ptr_ip4() { - # Get omplete host ...in-addr.arpa. + # Get complete host ...in-addr.arpa. echo "$1" | awk -F. \ '{ x = ( $4"."$3"."$2"."$1".in-addr.arpa" ) ; sub(/\/[0-9]+/,"",x) ; @@ -136,6 +136,7 @@ valid_subnet_any() { echo "not" fi } + ############################################################################## private_subnet() { @@ -152,6 +153,17 @@ private_subnet() { ############################################################################## +local_subnet() { + # local subnet 2nd place is limited to one digit to improve the filter + case "$1" in + 127"."[0-9]"."[0-9]*) echo "ok" ;; + ::1) echo "ok" ;; + *) echo "not" ;; + esac +} + +############################################################################## + domain_ptr_any() { local subnet=$1 local arpa validip4 validip6 |