From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 2/3] Unbound: do not generate PTR if the user requested not to, do so Date: Mon, 15 Apr 2019 10:50:38 +0100 Message-ID: <901D82BA-99CA-436D-BD0A-467B9A9A11D3@ipfire.org> In-Reply-To: <9d755e0c-eb20-9ad9-9cb5-9ee38f5cc1ec@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0901156150192252348==" List-Id: --===============0901156150192252348== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, > On 8 Apr 2019, at 19:04, Peter M=C3=BCller wro= te: >=20 > Partially fixes #12030 >=20 > Signed-off-by: Peter M=C3=BCller > --- > src/initscripts/system/unbound | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound > index af9bcef73..107f80477 100644 > --- a/src/initscripts/system/unbound > +++ b/src/initscripts/system/unbound > @@ -172,9 +172,9 @@ own_hostname() { > } >=20 > update_hosts() { > - local enabled address hostname domainname > + local enabled address hostname domainname generateptr >=20 > - while IFS=3D"," read -r enabled address hostname domainname; do > + while IFS=3D"," read -r enabled address hostname domainname generateptr; = do > [ "${enabled}" =3D "on" ] || continue >=20 > # Build FQDN > @@ -185,6 +185,9 @@ update_hosts() { > # Skip reverse resolution if the address equals the GREEN address > [ "${address}" =3D "${GREEN_ADDRESS}" ] && continue >=20 > + # Skip reverse resolution if user requested not to do so > + [ "${generateptr}" =3D "off" ] && continue You indented with spaces here when the whole file uses tabs. I changed that w= hen I merged the patch. -Michael > + > # Add RDNS > address=3D$(ip_address_revptr ${address}) > unbound-control -q local_data "${address} ${LOCAL_TTL} IN PTR ${fqdn}" > --=20 > 2.16.4 --===============0901156150192252348==--