forked from ungleich-public/cdist-contrib
__unbound: make the --dns64-prefix flag optional
This commit is contained in:
parent
2e02c413b6
commit
006987307f
4 changed files with 22 additions and 8 deletions
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
module_config="validator iterator"
|
||||||
|
if [ -n "$DNS64_PREFIX" ]; then
|
||||||
|
module_config="dns64 $module_config"
|
||||||
|
fi
|
||||||
|
|
||||||
generate_interface() {
|
generate_interface() {
|
||||||
for i in $INTERFACES; do
|
for i in $INTERFACES; do
|
||||||
echo " interface: $i"
|
echo " interface: $i"
|
||||||
|
@ -26,6 +31,12 @@ generate_local_data() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generate_dns64_prefix() {
|
||||||
|
if [ -n "$DNS64_PREFIX" ]; then
|
||||||
|
echo " dns64-prefix: $DNS64_PREFIX"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
#
|
#
|
||||||
# THIS FILE HAS BEEN GENERATED BY CDIST, DO NOT EDIT BY HAND.
|
# THIS FILE HAS BEEN GENERATED BY CDIST, DO NOT EDIT BY HAND.
|
||||||
|
@ -506,7 +517,7 @@ $(generate_access_control)
|
||||||
# most modules have to be listed at the beginning of the line,
|
# most modules have to be listed at the beginning of the line,
|
||||||
# except cachedb(just before iterator), and python (at the beginning,
|
# except cachedb(just before iterator), and python (at the beginning,
|
||||||
# or, just before the iterator).
|
# or, just before the iterator).
|
||||||
module-config: "dns64 validator iterator"
|
module-config: "$module_config"
|
||||||
|
|
||||||
# File with trusted keys, kept uptodate using RFC5011 probes,
|
# File with trusted keys, kept uptodate using RFC5011 probes,
|
||||||
# initial file like trust-anchor-file, then it stores metadata.
|
# initial file like trust-anchor-file, then it stores metadata.
|
||||||
|
@ -776,7 +787,8 @@ $(generate_local_data)
|
||||||
|
|
||||||
# DNS64 prefix. Must be specified when DNS64 is use.
|
# DNS64 prefix. Must be specified when DNS64 is use.
|
||||||
# Enable dns64 in module-config. Used to synthesize IPv6 from IPv4.
|
# Enable dns64 in module-config. Used to synthesize IPv6 from IPv4.
|
||||||
dns64-prefix: $DNS64_PREFIX
|
# dns64-prefix: $DNS64_PREFIX"
|
||||||
|
$(generate_dns64_prefix)
|
||||||
|
|
||||||
# DNS64 ignore AAAA records for these domains and use A instead.
|
# DNS64 ignore AAAA records for these domains and use A instead.
|
||||||
# dns64-ignore-aaaa: "example.com"
|
# dns64-ignore-aaaa: "example.com"
|
||||||
|
|
|
@ -13,9 +13,6 @@ answers from specified upstrean DNS server. This is a singleton type.
|
||||||
|
|
||||||
REQUIRED PARAMETERS
|
REQUIRED PARAMETERS
|
||||||
-------------------
|
-------------------
|
||||||
dns64_prefix
|
|
||||||
IPv6 prefix used for DNS64.
|
|
||||||
|
|
||||||
forward_addr
|
forward_addr
|
||||||
DNS servers used to lookup names, can be provided multiple times. It can be
|
DNS servers used to lookup names, can be provided multiple times. It can be
|
||||||
either an IPv4 or IPv6 address but no domain name.
|
either an IPv4 or IPv6 address but no domain name.
|
||||||
|
@ -38,6 +35,9 @@ local_data
|
||||||
Configure local data, which is served in reply to queries for it. Can be
|
Configure local data, which is served in reply to queries for it. Can be
|
||||||
specified multiple times.
|
specified multiple times.
|
||||||
|
|
||||||
|
dns64_prefix
|
||||||
|
Enable DNS64 with specified prefix.
|
||||||
|
|
||||||
BOOLEAN PARAMETERS
|
BOOLEAN PARAMETERS
|
||||||
------------------
|
------------------
|
||||||
disable-ip4
|
disable-ip4
|
||||||
|
|
|
@ -33,12 +33,15 @@ case "$os" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Required parameters:
|
# Required parameters:
|
||||||
DNS64_PREFIX=$(cat "$__object/parameter/dns64_prefix")
|
|
||||||
export DNS64_PREFIX
|
|
||||||
FORWARD_ADDRS=$(cat "$__object/parameter/forward_addr")
|
FORWARD_ADDRS=$(cat "$__object/parameter/forward_addr")
|
||||||
export FORWARD_ADDRS
|
export FORWARD_ADDRS
|
||||||
|
|
||||||
# Optional parameters:
|
# Optional parameters:
|
||||||
|
if [ -f "$__object/parameter/dns64_prefix" ]; then
|
||||||
|
DNS64_PREFIX=$(cat "$__object/parameter/dns64_prefix")
|
||||||
|
export DNS64_PREFIX
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$__object/parameter/interface" ]; then
|
if [ -f "$__object/parameter/interface" ]; then
|
||||||
INTERFACES=$(cat "$__object/parameter/interface")
|
INTERFACES=$(cat "$__object/parameter/interface")
|
||||||
export INTERFACES
|
export INTERFACES
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
dns64_prefix
|
|
Loading…
Reference in a new issue