aboutsummaryrefslogtreecommitdiff
path: root/net/unbound/files
diff options
context:
space:
mode:
authorMark Mentovai <mark@mentovai.com>2022-11-23 09:14:38 -0500
committerTianling Shen <cnsztl@gmail.com>2022-12-20 14:33:04 +0800
commit33581043d28ad63a2b511db0faf66d7777e608fb (patch)
tree70a7ca43b0487e4f2e01b77a5d6f850f4ba13782 /net/unbound/files
parent6e33a73f0cded2c13813c511071736c9020d0c83 (diff)
unbound: fix local_subnet for IPv6 addresses that contain a port
This prevents a forwarding server named like ::1@5453 from being added to unbound.conf as a forward-host instead of the correct forward-addr. forward-host requires the name to be resolved, which is impossible in the absence of another nameserver. Thus, forwarding-only configurations referencing only the IPv6 loopback address with a port number were broken. Signed-off-by: Mark Mentovai <mark@mentovai.com>
Diffstat (limited to 'net/unbound/files')
-rw-r--r--net/unbound/files/iptools.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unbound/files/iptools.sh b/net/unbound/files/iptools.sh
index 9524f4ffe..6726ed360 100644
--- a/net/unbound/files/iptools.sh
+++ b/net/unbound/files/iptools.sh
@@ -164,7 +164,7 @@ 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" ;;
+ ::1|::1@*|::1#*) echo "ok" ;;
*) echo "not" ;;
esac
}