Skip to content
Snippets Groups Projects
Commit 5e972e5a authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Reviewed old DDNS code.

parent d27c1d30
Branches
Tags
No related merge requests found
......@@ -4117,6 +4117,9 @@ int knot_ns_process_update(knot_nameserver_t *nameserver, knot_packet_t *query,
// 2) Find zone for the query
// we do not check if there is only one entry in the Question section
// because the packet structure does not allow it
/*! \todo This may probably change now, but the packet may be checked
* already if it goes through the usual processing. Find out!
*/
if (knot_packet_qtype(query) != KNOT_RRTYPE_SOA) {
dbg_ns("Question is not of type SOA.\n");
knot_ns_error_response_full(nameserver, response,
......@@ -4126,6 +4129,7 @@ int knot_ns_process_update(knot_nameserver_t *nameserver, knot_packet_t *query,
return KNOT_EOK;
}
/*! \todo What about some RCU? */
*zone = knot_zonedb_find_zone(nameserver->zone_db,
knot_packet_qname(query));
if (*zone == NULL) {
......
......@@ -423,6 +423,8 @@ int knot_ddns_check_zone(const knot_zone_t *zone, knot_packet_t *query,
return KNOT_ENOZONE;
}
/*! \todo Is this really necessary? What's the policy of updating zones?
*/
// 1) check if the zone is master or slave
if (!knot_zone_is_master(zone)) {
return KNOT_EBADZONE;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment