On Thu, Mar 21, 2013 at 01:38:42PM +0100, Petr Spacek wrote:
> Hello,
> 
>     Fix automatic reloading of invalid zone after each change in zone data.
> 
>     Reload wasn't done when serial_autoincrement feature was disabled.
> 
>     https://fedorahosted.org/bind-dyndb-ldap/ticket/102
> 

Ack.

But before the push, please add explicit comment to ldap_get_zone_serial()
call that the only reason of this call is to return ISC_R_SUCCESS in case the
zone is loaded or DNS_R_NOTLOADED in case it isn't. I studied the patch for more
then 15 minutes before I figured this.

Thanks, Adam

> From 1700a5d7dbf6c36ce235091a449e13a5e18fbb8b Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspa...@redhat.com>
> Date: Thu, 21 Mar 2013 13:35:17 +0100
> Subject: [PATCH] Fix automatic reloading of invalid zone after each change in
>  zone data.
> 
> Reload wasn't done when serial_autoincrement feature was disabled.
> 
> https://fedorahosted.org/bind-dyndb-ldap/ticket/102
> 
> Signed-off-by: Petr Spacek <pspa...@redhat.com>
> ---
>  src/ldap_helper.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 
> c10a23929c1536961a37d18e68d0669aa26539de..6f21b8407e8c01a98ae5b6f916c964432c651fd5
>  100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -3572,8 +3572,15 @@ update_restart:
>               CHECK(zr_get_zone_settings(inst->zone_register, &origin, 
> &zone_settings));
>               CHECK(setting_get_bool("serial_autoincrement", zone_settings,
>                                      &serial_autoincrement));
> +
> +             /* Serial autoincrement does zone state check implicitly.
> +              * Do explicit state check if serial autoincrement is disabled. 
> */
>               if (serial_autoincrement)
>                       CHECK(soa_serial_increment(mctx, inst, &origin));
> +             else {
> +                     isc_uint32_t dummy;
> +                     CHECK(ldap_get_zone_serial(inst, &origin, &dummy));
> +             }
>       }
>  
>  cleanup:
> -- 
> 1.7.11.7
> 


-- 
Adam Tkac, Red Hat, Inc.

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to