1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-06-25 09:14:06 +02:00

service: dnsmasq: Add ipv4? and ipv6? configuration options.

* gnu/services/dns.scm (<dnsmasq-configuration>) [ipv4?, ipv6?]: New fields.
(dnsmasq-shepherd-service): Use them.
* doc/guix.texi (DNS Services): Document them.

Change-Id: I50a4e407cea9e55295c9cfff081b7678ab7e061c
This commit is contained in:
Maxim Cournoyer
2026-05-24 12:55:53 +09:00
parent 663293331b
commit 185b9f4f19
2 changed files with 19 additions and 1 deletions
+6
View File
@@ -38201,6 +38201,12 @@ ie a subnet for which an interface exists on the server.
@item @code{listen-addresses} (default: @code{'()})
Listen on the given IP addresses.
@item @code{ipv4?} (default: @code{#t})
Whether to include A records in answers.
@item @code{ipv6?} (default: @code{#t})
Whether to include AAAA records in answers.
@item @code{resolv-file} (default: @code{"/etc/resolv.conf"})
The file to read the IP address of the upstream nameservers from.
+13 -1
View File
@@ -64,6 +64,8 @@
dnsmasq-configuration-port
dnsmasq-configuration-local-service?
dnsmasq-configuration-listen-address
dnsmasq-configuration-ipv4?
dnsmasq-configuration-ipv6?
dnsmasq-configuration-resolv-file
dnsmasq-configuration-no-resolv?
dnsmasq-configuration-forward-private-reverse-lookup?
@@ -793,6 +795,10 @@ cache.size = 100 * MB
(default #t)) ;boolean
(listen-addresses dnsmasq-configuration-listen-address
(default '())) ;list of string
(ipv4? dnsmasq-configuration-ipv4?
(default #t))
(ipv6? dnsmasq-configuration-ipv6?
(default #t))
(resolv-file dnsmasq-configuration-resolv-file
(default "/etc/resolv.conf")) ;string
(no-resolv? dnsmasq-configuration-no-resolv?
@@ -859,7 +865,7 @@ cache.size = 100 * MB
shepherd-requirement
pid-file
no-hosts?
port local-service? listen-addresses
port local-service? listen-addresses ipv4? ipv6?
resolv-file no-resolv?
forward-private-reverse-lookup? query-servers-in-order?
servers addresses servers-file
@@ -891,6 +897,12 @@ cache.size = 100 * MB
'())
#$@(map (cut format #f "--listen-address=~a" <>)
listen-addresses)
#$@(if (not ipv4?)
'("--filter-A")
'())
#$@(if (not ipv6?)
'("--filter-AAAA")
'())
#$(format #f "--resolv-file=~a" resolv-file)
#$@(if no-resolv?
'("--no-resolv")