From f5d19347ac5c3952462695ead4a6421041642945 Mon Sep 17 00:00:00 2001
From: Jan Kadlec <jan.kadlec@nic.cz>
Date: Sat, 20 Jul 2013 19:25:07 +0200
Subject: [PATCH] Do not allow out-of-zone data for DDNS.

- RFC 2136 states that the server should return the 'NOTZONE' error
  code, which it is correcly doing now, so there's no need to change it.
- Minor change only, since the actual check is somewhere before this code
  executes, but I've left the new_node functions as it was, since we
  may wish to allow some malformations later.

Refs #102
---
 src/libknot/updates/ddns.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/libknot/updates/ddns.c b/src/libknot/updates/ddns.c
index fb1415754..49bd1040a 100644
--- a/src/libknot/updates/ddns.c
+++ b/src/libknot/updates/ddns.c
@@ -1555,15 +1555,7 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 		                                 &node, knot_ddns_rr_is_nsec3(rr));
 		if (ret != KNOT_EOK) {
 			dbg_xfrin("Failed to create new node in zone.\n");
-			ret = xfrin_handle_error(zone->apex ? zone->apex->owner : NULL,
-		                             rr->owner, ret);
-			if (ret == KNOT_EOK) {
-		    	// Recoverable error, continue
-		    	return KNOT_EOK;
-			} else {
-            	// Fatal error, rollback update
-				return ret;
-			}
+			return ret;
 		}
 	}
 
-- 
GitLab