[Freeipa-devel] [PATCH 0082] Disable forwarding when forward zones are removed
Adam Tkac
atkac at redhat.com
Mon Oct 29 15:26:31 UTC 2012
On Mon, Oct 29, 2012 at 02:24:48PM +0100, Petr Spacek wrote:
> On 10/26/2012 03:33 PM, Petr Spacek wrote:
> >Hello,
> >
> > Disable forwarding when forward zones are removed.
> >
> > https://fedorahosted.org/bind-dyndb-ldap/ticket/96
> >
> Hmm ... Apparently, I was sleeping on Friday :-)
>
> There is a promised patch.
Ack
> From d1936f0fbd62aedc8b4c4d21aea44df7d2a11fa4 Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspacek at redhat.com>
> Date: Fri, 26 Oct 2012 15:19:07 +0200
> Subject: [PATCH] Disable forwarding when forward zones are removed.
>
> https://fedorahosted.org/bind-dyndb-ldap/ticket/96
>
> Signed-off-by: Petr Spacek <pspacek at redhat.com>
> ---
> src/ldap_helper.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index dce1943484cfeb1519ead67c28c9377b155c275c..19470d557afe5d44eba3d8b37502d296ccfd67b1 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -812,11 +812,16 @@ ldap_delete_zone2(ldap_instance_t *inst, dns_name_t *name, isc_boolean_t lock)
> result == ISC_R_LOCKBUSY);
> if (result == ISC_R_SUCCESS)
> unlock = ISC_TRUE;
> -
> - /* TODO: flush cache records belonging to deleted zone */
> - CHECK(discard_from_cache(inst->cache, name));
> }
>
> + /* Disable forwarding. */
> + result = dns_fwdtable_delete(inst->view->fwdtable, name);
> + if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND)
> + log_error_r("zone '%s': failed to delete forwarders", zone_name_char);
> +
> + /* TODO: flush cache records belonging to deleted zone */
> + CHECK(discard_from_cache(inst->cache, name));
> +
> result = zr_get_zone_ptr(inst->zone_register, name, &zone);
> if (result == ISC_R_NOTFOUND || result == DNS_R_PARTIALMATCH) {
> log_debug(1, "zone '%s' not found in zone register", zone_name_char);
> --
> 1.7.11.7
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel
--
Adam Tkac, Red Hat, Inc.
More information about the Freeipa-devel
mailing list