From patchwork Mon Aug 21 15:12:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Wicki Gabriel (wicg)" X-Patchwork-Id: 53074 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4F1FD27BBEA; Mon, 21 Aug 2023 16:13:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, LONG_INVISIBLE_TEXT,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8078B27BBE2 for ; Mon, 21 Aug 2023 16:13:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qY6aV-0003oo-El; Mon, 21 Aug 2023 11:13:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qY6aS-0003oA-JA for guix-patches@gnu.org; Mon, 21 Aug 2023 11:13:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qY6aS-0006iD-Ax for guix-patches@gnu.org; Mon, 21 Aug 2023 11:13:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qY6aU-000558-HZ for guix-patches@gnu.org; Mon, 21 Aug 2023 11:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61869] Review of the third patch References: In-Reply-To: Resent-From: "Wicki Gabriel (wicg)" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Aug 2023 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61869 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: "61869@debbugs.gnu.org" <61869@debbugs.gnu.org> Cc: "me@tobias.gr" Received: via spool by 61869-submit@debbugs.gnu.org id=B61869.169263073819480 (code B ref 61869); Mon, 21 Aug 2023 15:13:02 +0000 Received: (at 61869) by debbugs.gnu.org; 21 Aug 2023 15:12:18 +0000 Received: from localhost ([127.0.0.1]:57518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qY6Zl-000547-1b for submit@debbugs.gnu.org; Mon, 21 Aug 2023 11:12:17 -0400 Received: from mail-gv0che01on2077.outbound.protection.outlook.com ([40.107.23.77]:51808 helo=CHE01-GV0-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qY6Zi-00053s-6T for 61869@debbugs.gnu.org; Mon, 21 Aug 2023 11:12:15 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NyVsihVzbVJvCS4ruBWfsFuksqh8tHiVhTrbWVOi4RvNBZv1iDfci0LqH1JHmI0WErMXiyHgNZrn2uzqP5kJ5+9oBNaV7wJxG6uFK9nYsWkkPez4i/5m8xEYZ1hj0177G4xu+NZlHh54v2AMOg2NgxnmxjbY8zNDueEcGjnP+kvqLKyIdiSpmsI2Gbwcsq4sv5ivtGGXBViNVzIE8BB3tvji6wHET/BmnGj3ho/Ccnepq7qNtLwFnK7h6ouIzbj7vhNswb9sUImc08D1224oHIG2GaEJY9zehWeZwSCU6rOCKhjtLkWi+ib+Jg8zt02EkWqaoWrUXrnQChDgst4D7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U2WL9WQ+a9vw990KqY5ZOVnadIhHS1puU8+9H4s59Nc=; b=AXquCLgQEuD98fTw6EFqq42AXWUe8LiJ6JdnWLPLEzhgmTdcEMf5881NC1YCCWXbqoZSEShZC+LsoHBOM515NxO7pDkJmJCYZMQBfrKJxKnu1DjFHS6OGLXO0K3fjgOTxU0bkoi4zeUQmL4j1GoF9ab58Hyi2GD5vXakXFA9y2XsQXc+Z9aXrwlq/L4Um99uEO4hXA9kf5FkZgSyGWDvOc26EzUZUvNjGZbfVL5CcYdMw0vJ7tdtuveusnxG84q8L0WdV1GZ1StcO4aMNq1Uz4jjD5kQUnxQmgy0Q+eBvCVPck8AaksEBjy4CQuJ7XJ3iRMWgxHPS2rC2Qm1u/j8eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=zhaw.ch; dmarc=pass action=none header.from=zhaw.ch; dkim=pass header.d=zhaw.ch; arc=none Received: from ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:25::9) by ZR0P278MB0822.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:43::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Mon, 21 Aug 2023 15:12:04 +0000 Received: from ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM ([fe80::5963:40cd:3d1e:cb00]) by ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM ([fe80::5963:40cd:3d1e:cb00%7]) with mapi id 15.20.6699.022; Mon, 21 Aug 2023 15:12:04 +0000 From: "Wicki Gabriel (wicg)" Thread-Topic: Review of the third patch Thread-Index: AQHZ1DWL4wl+nnvI5ECxRFn93vxqAw== Date: Mon, 21 Aug 2023 15:12:04 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: msip_labels: MSIP_Label_10d9bad3-6dac-4e9a-89a3-89f3b8d247b2_Enabled=True; MSIP_Label_10d9bad3-6dac-4e9a-89a3-89f3b8d247b2_SiteId=5d1a9f9d-201f-4a10-b983-451cf65cbc1e; MSIP_Label_10d9bad3-6dac-4e9a-89a3-89f3b8d247b2_SetDate=2023-08-21T15:12:03.539Z; MSIP_Label_10d9bad3-6dac-4e9a-89a3-89f3b8d247b2_Name=Intern; MSIP_Label_10d9bad3-6dac-4e9a-89a3-89f3b8d247b2_ContentBits=0; MSIP_Label_10d9bad3-6dac-4e9a-89a3-89f3b8d247b2_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=zhaw.ch; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: ZR0P278MB0268:EE_|ZR0P278MB0822:EE_ x-ms-office365-filtering-correlation-id: 30f9c33a-fcda-4e93-3590-08dba258fa44 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zgw66h4HU13KRXtYpQsN4RpqybeibSVtouBEfWd+k8i7UfRKlUsg56CxtEhdhCj++0yB5628tx54aCfg5aJUzm7w/eYpK+qe64KvcpadGMOPDtSMrQaFvKvAgR/9JoTd7yz9YuQ1sJavzRzD5SG4iXC3lYjVjW696nbSC1E05fPhqwWqO8hEEP6ZSm50I4am+C1k9UQH3WYFI/s/ZCrG22JyURehwNtxg4vbWND2i3VpiGabNt0RAmP6ixcZpikFq4yo7d+UUCOzcFoxb325kYXg6nWw05pCYW12lalp4Csd05KTfsNYufHvvnioUIhTIs/DjL0CpKz+occYpIDmLK/ebG+7p+h66dkiSgcJvZ85eyKRt6rGgWXdZuvSgEbE7oBKy79ES7zqlP1hBNROqC9GYDiL3uT6UK1PFh4bztLqOV+eXU7WaGg76At4+a53g9b9huOGZfGZa1EqQwedPPYwjkBP6M9dZaKFwLs70PUQYsfPgoB/mtjSKhGtNi0RALkMQjWa6ZcLgBwaz2qKkxPVpszVOtbvGdyiWi0fF9dh/aI8mHuBJm08wOKa7sixQkjA/x6IERMqTEfNGp7tLv9oZswUxVSxHdQCiq2izVV42v6DEX0Zn8Rk70NOW+q+ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(136003)(39850400004)(346002)(396003)(451199024)(1800799009)(186009)(4744005)(5660300002)(2906002)(19627405001)(52536014)(4326008)(8936002)(8676002)(41300700001)(66446008)(64756008)(71200400001)(66556008)(76116006)(786003)(66476007)(66946007)(6916009)(7696005)(316002)(6506007)(478600001)(9686003)(26005)(83380400001)(86362001)(33656002)(99936003)(55016003)(38070700005)(122000001)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: UKNvErSmCvahGJ4khAzjgFfXbSCasGphxujgccnpqXbkeC2uY88xHuc0UjWmDGmTLo+U1HfHd6krWkr3xFtFwovw+XxJHzFI6UMtNN8qXJcLiA4dfHBdSmJAzOn80dn0cyP6YdXKkDgCpEY+yutaqR08mR6HjofDcBnLZTI983CCn2gm8HKAhWiVM0FR67rM2z25LsFPPXQQKjM1jug97M6/fssHgddysPRZIpLA2WPz6N2jyHYUw7/7aCSkvJtSNIGGjXdmw7NUNDUfsTbgsF7ZT12o+mzt+881vTw+7Tbr0DfHocijVyl386BLIbzxsj+Mo5V2D2lf8lKTfZJtoKJVHX5JHE49xkLrCagkM9SZkgN2w2ATwk/fk+09YoLVXH1hKWRdspIvMsg5COi3NUCFWJy3+pVi6Av7W1Cf8e5D8uxvywvnJfsYkFqTDc4ghHcVZJ57Q1lhZvS9h+r10PAZiUEZLH+x6vYGtr8OeCqC+JMvJ+1MtODN6FKF4uAac4FNgbqjcwpCzK0Nr12TLFnlXUqy0zj8UCbWuyrVrMTv4VdAiUBoRt6GfuZ1inNwStiAwrRXjyMVVh5GG/qpBAfv7xfWsgjZVmaB7XkUW9gmJiqfz4RWsT7cSfYib2RT2aOSti/g6tWNWg/edjH/ptCQndiwgGWCck4ypdy+6vQlOmZVa2Zk9obyKUpsFzYQ5eE2Ddt3rK+YqD9oZa/7h5a4JbLrwuMGO9FxG5xkBJxPXGN/lGITeyF4BgTXhchNSvmNIaOncSy6OWAU6fs/bb3Vkgi2/r2lyw8nNzgY37ShjawpOxOhT1uctzM6A7PyHHVvytwJDNx1Uuzf33U/WMEmaM2pqqjpW5rQmtaYA2T5b9cntEo89gj5RgQD40kN44sOBycmAa2fV5SdCLXc0LndmL3aid4FhEjRiA6g8wcJnPfTaLhIUfrvdAaaXjLiv6p8wvZUbQ7gvSbnpzaKVx2ujWODfeYxTX9w37SLp0MOXw81kZKIHlGkNS+CGM6VdVRtK5JrowkeHky4zwnaLkGFdS8yuiW19PnJu3/DUJKw/qfkSccUIIbBl9OyNCF6GSTQa6QsAWIhjRY0JJUWjZNfNUlEVWIGCTkrTZr4Yqpxzw/c/s7uBKXh7vp1NH8ssJSCGtVHTQjl/AKdbaRHo/rHc+sLO+4+z4txX97x+QGDV9xUgKaOQyIIZvL1+pAV/6WdDS0C8djl6AMiFIVI9imEcUBnV4wVx6JfA82ez5fLNDNqMGZAbhbMTtFTexnsJCHLHgxK6xRjIgoNddvNmFAiADcCgntaRrjJbPjXPKCL5WdBr0sQ+Zphsx8bFtrcMNqjIS9jyCbcEpbdwVVzEEAw21WglcCbaiBQI7i4nLjZA1efesNwcd0ufF7tckjexoULpTThMRwG1ID71elXdByVN1DJCOHNxFi448dn879i43JPiCx8aVFU9BXauwhH5rIcgT9M9yLRzITwmGqRARZar+bgtQ3FhC7/0B86O92dtYRld6zysGy32R5bu+kgvUWuJvAZmOzPjgfLZfhmLA== MIME-Version: 1.0 X-OriginatorOrg: zhaw.ch X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 30f9c33a-fcda-4e93-3590-08dba258fa44 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2023 15:12:04.2214 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d1a9f9d-201f-4a10-b983-451cf65cbc1e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MEp2l7exbeCFCUd/PQpxRCic9/RtNouaF8JJ5jvD3vaMTzm9v4CP+2EmYTd7+rYP X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR0P278MB0822 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Thank you very much for your review and the third patch! I have 3 small additions to your work (see your adapted patch in the attachments): * I added a commit message (although I guess you'll edit that again anyways) * I extended your explanations on the `interface' option (when bind-dynamic​?` or​ bind-interfaces?​ is set...) * I filled in your TODO Please let me know (don't forget to cc me in your reply) if I can do anything else to merge this patch-set. Thanks again, for your time, patience and expertise gabriel From a6a696994f7d5ef58f85b4aaa14c088428e49353 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <185f1c3a6523eae9f59ebf9a9789405305c6a1c4.1692630490.git.wicg@zhaw.ch> References: <185f1c3a6523eae9f59ebf9a9789405305c6a1c4.1692630490.git.wicg@zhaw.ch> From: Gabriel Wicki Date: Mon, 21 Aug 2023 16:57:19 +0200 Subject: [PATCH 3/3] services: dnsmasq: Fix inconsistencies. * doc/guix.texi: Adapt the service documentation to reflect dnsmasq's man-pages. * gnu/services/dns.scm (): [interface, domain, dhcp-range, dhcp-options] Rename fields to reflect object type (i.e. plural for lists). [local] Remove option (this is an alias for servers). [bind-interfaces?] New option. --- doc/guix.texi | 100 ++++++++++++++++++++++++++++++++++--------- gnu/services/dns.scm | 47 ++++++++++---------- 2 files changed, 103 insertions(+), 44 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ba8f8a52ce..1a65d33228 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -32472,42 +32472,102 @@ DNS Services queries which are forwarded upstream. @item @code{domain-needed?} (default: @code{#f}) -Whether to forward queries with no domain part. +@code{#t} tells dnsmasq to never forward A or AAAA queries for plain +names, without dots or domain parts, to upstream nameservers. +If the name is not known from @file{/etc/hosts} or DHCP then a ``not found'' +answer is returned. @item @code{bogus-priv?} (default: @code{#f}) -Whether to fake reverse lookups for RFC1918 private address ranges. +Whether to fake bogus reverse lookups for RFC6303 private address ranges. +All reverse lookups for private IP ranges (e.g. 192.168.x.x) which are not +found in @file{/etc/hosts} or the DHCP leases file are answered with +``no such domain'' rather than being forwarded upstream. @item @code{filterwin2k?} (default: @code{#f}) -Whether to forward spurious DNS requests from Windows hosts. +Whether to block spurious DNS requests periodically made by hosts running +Windows, which don't get sensible answers from the public DNS. @item @code{poll?} (default: @code{#t}) -Continuously reads @file{/etc/resolv.conf} when @code{#true}, otherwise only -does so on SIGHUP. +When @code{#t}, continuously check @file{/etc/resolv.conf} for changes. +Otherwise do so only on SIGHUP. -@item @code{local} (default: @code{#f}) -A string representing domains where nothing will be forwarded to -@code{"/domain/"}). +@item @code{interfaces} (default: @code{'()}) +Listen only on the specified list of interfaces, such as @code{"wlp3"} +or @code{"lan0"}. The local (loopback) interface is added automatically. +If this list is empty, listen on all available interfaces. -@item @code{interface} (default: @code{#f}) -The interface(s) dnsmasq works on (like @code{"wlp3"} or @code{"lan0"}. -Multiple names can be specified as strings separated by commas. +When @code{bind-dynamic?} or @code{bind-interfaces?} is set on Linux, IP +alias interface labels such as @code{"eth1:0"} will be checked rather +than interface names. + +@item @code{bind-interfaces?} (default: @code{#f}) +When @code{#t} on systems which support it, dnsmasq binds the wildcard +address, to discard requests for interfaces it is not supposed to reply +to later. This should only be necessary when running another nameserver +(or another instance of dnsmasq) on the same machine. @item @code{bind-dynamic?} (default: @code{#f}) -Bind to interfaces in use - check for new interfaces. +When @code{#t}, bind to the address of the network interfaces +currently in use, allowing for multiple Dnsmasq instances. +Moreover, automatically listen on any new interfaces or addresses +that appear later on---subject to access control configuration. + +This mode is available only on Linux. On other kernels, it will fall +back to @code{bind-interfaces?} mode. @item @code{expand-hosts?} (default: @code{#f}) -Expand simple names in @file{/etc/hosts} with domain-suffix. +Add the domain to simple names (those without a period) in +@file{/etc/hosts} in the same way as for DHCP-derived names. This does +not apply to domain names in cnames, PTR records, TXT records, etc. -@item @code{domain} (default: @code{#f}) -Specify the domain to be assigned in DHCP leases. +@item @code{domains} (default: @code{'()}) +A list of strings describing DNS domains for the DHCP server. Domains +may be be given unconditionally (without the IP range) or for limited +IP ranges. + +This has two effects; firstly it causes the DHCP server to return the +domain to any hosts which request it, and secondly it sets the domain +which it is legal for DHCP-configured hosts to claim. + +If a domain suffix is specified, then hostnames with a domain part are +allowed, provided the domain part matches the suffix. Hostnames +without a domain part have the suffix added as an optional domain part. + +If no domain suffix is specified, then any DHCP hostname with a domain +part (i.e., with a period) will be disallowed and logged. -@item @code{dhcp-range} (default: @code{#f}) -Enable DHCP in the range given with lease duration, the format is -@code{,,,}, e.g. -@code{192.0.2.50,192.0.2.150,255.255.255.0,1h}. +@item @code{dhcp-ranges} (default: @code{'()}) +Whether to enable the DHCP server for the given range(s). Each range +is a string that commonly follows the format +@code{,[,[,]]}, e.g. +@code{"192.0.2.50,192.0.2.150,255.255.255.0,1h"}. + +IP addresses will be given out (``leased'') from the range +@code{} to @code{}, with an optional +@code{}. +@comment …and from statically defined addresses given in --dhcp-host options. + +@code{} is optional. If given, leases will be valid +for that length of time: in seconds if no unit is given (e.g., +@code{45m}, @code{12h}, @code{7d}, @code{1w}), or @code{infinite}. + +Refer to the dnsmasq(8) man page for more options and information. @item @code{dhcp-options} (default: @code{'()}) -A list of options to be passed along. +A list of DHCP option strings as listed in the output of +@command{dnsmasq --help dhcp} and @command{dnsmasq --help dhcp6}. + +You can use both numerical options and their readable names: + +@lisp +;; This friendly list… +(list "option:router,1.2.3.4" + "option6:dns-server,[::],[1234::88]") + +;; …is equivalent to this one. +(list "3,1.2.3.4" + "23,[::],[1234::88]") +@end lisp @item @code{tftp-enable?} (default: @code{#f}) Whether to enable the built-in TFTP server. diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 17dec9ad8a..33af84e621 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2022 Remco van 't Veer ;;; Copyright © 2023 Gabriel Wicki +;;; Copyright © 2023 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -774,19 +775,19 @@ (define-record-type* (default #f)) ;boolean (poll? dnsmasq-configuration-poll? (default #t)) ;boolean - (local dnsmasq-configuration-local - (default #f)) ;string - (interface dnsmasq-configuration-interface - (default #f)) ;string + (interfaces dnsmasq-configuration-interfaces + (default '())) ;list of string + (bind-interfaces? dnsmasq-configuration-bind-interfaces? + (default #f)) ;boolean (bind-dynamic? dnsmasq-configuration-bind-dynamic? (default #f)) ;boolean (expand-hosts? dnsmasq-configuration-expand-hosts? (default #f)) ;boolean - (domain dnsmasq-configuration-domain - (default #f)) ;string - (dhcp-range dnsmasq-configuration-dhcp-range - (default #f)) ;string - (dhcp-options dnsmasq-configuration-dhcp-options + (domains dnsmasq-configuration-domains + (default '())) ;list of string + (dhcp-ranges dnsmasq-configuration-dhcp-ranges + (default '())) ;list of string + (dhcp-options dnsmasq-configuration-dhcp-options (default '())) ;list of string (tftp-enable? dnsmasq-configuration-tftp-enable? (default #f)) ;boolean @@ -822,10 +823,10 @@ (define (dnsmasq-shepherd-service config) cache-size negative-cache? cpe-id domain-needed? bogus-priv? filterwin2k? poll? - local interface - bind-dynamic? expand-hosts? - domain - dhcp-range dhcp-options + interfaces + bind-interfaces? bind-dynamic? expand-hosts? + domains + dhcp-ranges dhcp-options tftp-enable? tftp-no-fail? tftp-single-port? tftp-secure? tftp-max tftp-mtu tftp-no-blocksize? @@ -885,11 +886,11 @@ (define (dnsmasq-shepherd-service config) #$@(if poll? '() '("--no-poll")) - #$@(if local - (list (format #f "--local=~a" local)) - '()) - #$@(if interface - (list (format #f "--interface=~a" interface)) + #$@(if (null? interfaces) + '() + (list (format #f "--interface=~{~a~^,~}" interfaces))) + #$@(if bind-interfaces? + '("--bind-interfaces") '()) #$@(if bind-dynamic? '("--bind-dynamic") @@ -897,12 +898,10 @@ (define (dnsmasq-shepherd-service config) #$@(if expand-hosts? '("--expand-hosts") '()) - #$@(if domain - (list (format #f "--domain=~a" domain)) - '()) - #$@(if dhcp-range - (list (format #f "--dhcp-range=~a" dhcp-range)) - '()) + #$@(map (cut format #f "--domain=~a" <>) + domains) + #$@(map (cut format #f "--dhcp-range=~a" <>) + dhcp-ranges) #$@(map (cut format #f "--dhcp-option=~a" <>) dhcp-options) #$@(if tftp-enable? -- 2.40.1