Re: [Freeipa-devel] [PATCH 0307] Send DNS NOTIFY message after any modification to the zone

2014-11-27 Thread Tomas Hozza
On 11/26/2014 01:46 PM, Martin Basti wrote:
 On 07/11/14 15:34, Petr Spacek wrote:
  Hello,
 
  Send DNS NOTIFY message after any modification to the zone.
 
  https://fedorahosted.org/bind-dyndb-ldap/ticket/144
 
 Works for me. But don't push it before Tomas check the code please.
 Martin^2

ACK. Works for me...

Regards,
-- 
Tomas Hozza
Software Engineer - EMEA ENG Developer Experience

PGP: 1D9F3C2D
Red Hat Inc. http://cz.redhat.com

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


Re: [Freeipa-devel] [PATCH 0307] Send DNS NOTIFY message after any modification to the zone

2014-11-27 Thread Petr Spacek
On 27.11.2014 15:56, Tomas Hozza wrote:
 On 11/26/2014 01:46 PM, Martin Basti wrote:
  On 07/11/14 15:34, Petr Spacek wrote:
   Hello,
  
   Send DNS NOTIFY message after any modification to the zone.
  
   https://fedorahosted.org/bind-dyndb-ldap/ticket/144
  
  Works for me. But don't push it before Tomas check the code please.
  Martin^2
 
 ACK. Works for me...

Pushed to master: 7dd6ba6c70273fef0ffd34b265e6f1a1b6988a26

-- 
Petr^2 Spacek

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


Re: [Freeipa-devel] [PATCH 0307] Send DNS NOTIFY message after any modification to the zone

2014-11-26 Thread Martin Basti

On 07/11/14 15:34, Petr Spacek wrote:

Hello,

Send DNS NOTIFY message after any modification to the zone.

https://fedorahosted.org/bind-dyndb-ldap/ticket/144


Works for me. But don't push it before Tomas check the code please.
Martin^2

--
Martin Basti

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


[Freeipa-devel] [PATCH 0307] Send DNS NOTIFY message after any modification to the zone

2014-11-07 Thread Petr Spacek
Hello,

Send DNS NOTIFY message after any modification to the zone.

https://fedorahosted.org/bind-dyndb-ldap/ticket/144

-- 
Petr^2 Spacek
From 8980758721b57789c0f984465845f89c4705b872 Mon Sep 17 00:00:00 2001
From: Petr Spacek pspa...@redhat.com
Date: Fri, 7 Nov 2014 15:12:38 +0100
Subject: [PATCH] Send DNS NOTIFY message after any modification to the zone.

https://fedorahosted.org/bind-dyndb-ldap/ticket/144
---
 src/ldap_helper.c | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index cb1ada64635406552f6b231cdb19a888a0f92244..091be5ddd473cce170e2b84c7477143cf4a6ee15 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -1017,7 +1017,7 @@ cleanup:
  * @warning Never call this on raw part of in-line secure zone.
  */
 static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
-load_zone(dns_zone_t *zone) {
+load_zone(dns_zone_t *zone, isc_boolean_t log) {
 	isc_result_t result;
 	isc_boolean_t zone_dynamic;
 	isc_uint32_t serial;
@@ -1036,15 +1036,18 @@ load_zone(dns_zone_t *zone) {
 	}
 
 	CHECK(dns_zone_getserial2(raw, serial));
-	dns_zone_log(raw, ISC_LOG_INFO, loaded serial %u, serial);
+	if (log == ISC_TRUE)
+		dns_zone_log(raw, ISC_LOG_INFO, loaded serial %u, serial);
 	if (zone != NULL) {
 		result = dns_zone_getserial2(zone, serial);
-		if (result == ISC_R_SUCCESS)
+		if (result == ISC_R_SUCCESS  log == ISC_TRUE)
 			dns_zone_log(zone, ISC_LOG_INFO, loaded serial %u,
  serial);
 		/* in-line secure zone is loaded asynchonously in background */
 		else if (result == DNS_R_NOTLOADED) {
-			dns_zone_log(zone, ISC_LOG_INFO, signing in progress);
+			if (log == ISC_TRUE)
+dns_zone_log(zone, ISC_LOG_INFO,
+	 signing in progress);
 			result = ISC_R_SUCCESS;
 		} else
 			goto cleanup;
@@ -1154,7 +1157,7 @@ activate_zone(isc_task_t *task, ldap_instance_t *inst, dns_name_t *name) {
 		goto cleanup;
 	}
 
-	CHECK(load_zone(toview));
+	CHECK(load_zone(toview, ISC_TRUE));
 	if (secure != NULL) {
 		CHECK(zr_get_zone_settings(inst-zone_register, name,
 	   zone_settings));
@@ -2491,9 +2494,7 @@ ldap_parse_master_zoneentry(ldap_entry_t * const entry, dns_db_t * const olddb,
 	if (isactive == ISC_TRUE) {
 		if (new_zone == ISC_TRUE || activity_changed == ISC_TRUE)
 			CHECK(publish_zone(task, inst, toview));
-		if (data_changed == ISC_TRUE || olddb != NULL ||
-		activity_changed == ISC_TRUE)
-			CHECK(load_zone(toview));
+		CHECK(load_zone(toview, ISC_FALSE));
 	} else if (activity_changed == ISC_TRUE) { /* Zone was deactivated */
 		CHECK(unpublish_zone(inst, name, entry-dn));
 		dns_zone_log(toview, ISC_LOG_INFO, zone deactivated 
@@ -4668,9 +4669,9 @@ cleanup:
 			 reload triggered by change in '%s',
 			 pevent-dn);
 		if (secure != NULL)
-			result = load_zone(secure);
+			result = load_zone(secure, ISC_TRUE);
 		else if (raw != NULL)
-			result = load_zone(raw);
+			result = load_zone(raw, ISC_TRUE);
 		if (result == ISC_R_SUCCESS || result == DNS_R_UPTODATE ||
 		result == DNS_R_DYNAMIC || result == DNS_R_CONTINUE) {
 			/* zone reload succeeded, fire current event again */
-- 
1.9.3

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