aboutsummaryrefslogtreecommitdiff
path: root/net/bind
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2022-12-27 17:54:16 -0700
committerNoah Meyerhans <frodo@morgul.net>2023-01-02 14:15:57 -0800
commita7b770eec4370087a5ccd27887386dac9266214e (patch)
tree75732ba54b19f827c4a15e071b02c2c0988156be /net/bind
parent360383a997baa8e076d9b50d3f7509e8b4fea6ac (diff)
bind: start up with -4 if not listening on ipv6 addresses
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'net/bind')
-rw-r--r--net/bind/Makefile2
-rw-r--r--net/bind/files/named.init9
2 files changed, 9 insertions, 2 deletions
diff --git a/net/bind/Makefile b/net/bind/Makefile
index e53a7e7f8..699f93550 100644
--- a/net/bind/Makefile
+++ b/net/bind/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=bind
PKG_VERSION:=9.18.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
diff --git a/net/bind/files/named.init b/net/bind/files/named.init
index 7c61b5e2a..312e297fb 100644
--- a/net/bind/files/named.init
+++ b/net/bind/files/named.init
@@ -30,6 +30,10 @@ fix_perms() {
done
}
+no_ipv6() {
+ [ -z "$(ip -6 -o route show default)" ]
+}
+
reload_service() {
rndc -q reload
}
@@ -68,8 +72,11 @@ start_service() {
touch $conf_local_file
+ local args=
+ [ no_ipv6 ] && args="-4"
+
procd_open_instance
- procd_set_param command /usr/sbin/named -u bind -f -c $config_file
+ procd_set_param command /usr/sbin/named -u bind -f $args -c $config_file
procd_set_param file $config_file \
$config_dir/bind.keys \
$named_options_file \