Commit d182f90b authored by Jan Včelák's avatar Jan Včelák 🚀

move libknot/updates to knot/updates

issue #1
parent bdac7253
......@@ -135,6 +135,12 @@ src/knot/stat/gatherer.h
src/knot/stat/stat-common.h
src/knot/stat/stat.c
src/knot/stat/stat.h
src/knot/updates/changesets.c
src/knot/updates/changesets.h
src/knot/updates/ddns.c
src/knot/updates/ddns.h
src/knot/updates/xfr-in.c
src/knot/updates/xfr-in.h
src/knot/zone/estimator.c
src/knot/zone/estimator.h
src/knot/zone/node.c
......@@ -208,12 +214,6 @@ src/libknot/tsig-op.c
src/libknot/tsig-op.h
src/libknot/tsig.c
src/libknot/tsig.h
src/libknot/updates/changesets.c
src/libknot/updates/changesets.h
src/libknot/updates/ddns.c
src/libknot/updates/ddns.h
src/libknot/updates/xfr-in.c
src/libknot/updates/xfr-in.h
src/libknot/util/debug.c
src/libknot/util/debug.h
src/libknot/util/endian.h
......
......@@ -114,12 +114,6 @@ libknot_la_SOURCES = \
libknot/packet/compr.c \
libknot/packet/compr.h \
libknot/packet/wire.h \
libknot/updates/changesets.h \
libknot/updates/changesets.c \
libknot/updates/xfr-in.h \
libknot/updates/xfr-in.c \
libknot/updates/ddns.h \
libknot/updates/ddns.c \
libknot/dname.c \
libknot/consts.h \
libknot/edns.h \
......@@ -282,6 +276,12 @@ libknotd_la_SOURCES = \
knot/stat/stat-common.h \
knot/stat/stat.c \
knot/stat/stat.h \
knot/updates/changesets.h \
knot/updates/changesets.c \
knot/updates/xfr-in.h \
knot/updates/xfr-in.c \
knot/updates/ddns.h \
knot/updates/ddns.c \
knot/zone/estimator.c \
knot/zone/estimator.h \
knot/zone/semantic-check.c \
......
......@@ -22,7 +22,7 @@
#include <urcu.h>
#include "knot/nameserver/name-server.h"
#include "libknot/updates/xfr-in.h"
#include "knot/updates/xfr-in.h"
#include "libknot/libknot.h"
#include "common/errcode.h"
......@@ -32,8 +32,8 @@
#include "libknot/packet/pkt.h"
#include "libknot/consts.h"
#include "common/descriptor.h"
#include "libknot/updates/changesets.h"
#include "libknot/updates/ddns.h"
#include "knot/updates/changesets.h"
#include "knot/updates/ddns.h"
#include "libknot/tsig-op.h"
#include "libknot/rdata.h"
#include "libknot/dnssec/random.h"
......
......@@ -46,7 +46,7 @@
#include "libknot/packet/pkt.h"
#include "common/sockaddr.h"
#include "common/lists.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
struct conf_t;
struct server_t;
......
......@@ -6,7 +6,7 @@
#include "knot/nameserver/name-server.h"
#include "libknot/util/debug.h"
#include "libknot/dnssec/zone-events.h"
#include "libknot/updates/ddns.h"
#include "knot/updates/ddns.h"
#include "common/descriptor.h"
#include "knot/server/zones.h"
......
......@@ -34,7 +34,7 @@
#include "knot/server/socket.h"
#include "knot/server/udp-handler.h"
#include "knot/server/tcp-handler.h"
#include "libknot/updates/xfr-in.h"
#include "knot/updates/xfr-in.h"
#include "libknot/packet/wire.h"
#include "knot/server/zones.h"
#include "libknot/tsig-op.h"
......
......@@ -35,9 +35,9 @@
#include "knot/nameserver/chaos.h"
#include "libknot/rdata.h"
#include "libknot/tsig-op.h"
#include "libknot/updates/changesets.h"
#include "libknot/updates/ddns.h"
#include "libknot/updates/xfr-in.h"
#include "knot/updates/changesets.h"
#include "knot/updates/ddns.h"
#include "knot/updates/xfr-in.h"
#include "libknot/packet/wire.h"
#include "knot/zone/zone-contents.h"
#include "knot/zone/zone-diff.h"
......
......@@ -39,7 +39,7 @@
#include "knot/server/server.h"
#include "knot/server/journal.h"
#include "knot/zone/zone.h"
#include "libknot/updates/xfr-in.h"
#include "knot/updates/xfr-in.h"
/* Constants. */
#define ZONES_JITTER_PCT 10 /*!< +-N% jitter to timers. */
......
......@@ -19,7 +19,7 @@
#include <stdlib.h>
#include <assert.h>
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "libknot/common.h"
#include "common/descriptor.h"
#include "common/mempattern.h"
......
......@@ -19,8 +19,8 @@
#include <stdlib.h>
#include <inttypes.h>
#include "libknot/updates/ddns.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/ddns.h"
#include "knot/updates/changesets.h"
#include "libknot/rdata.h"
#include "libknot/util/debug.h"
#include "libknot/packet/pkt.h"
......@@ -28,7 +28,7 @@
#include "libknot/consts.h"
#include "common/mempattern.h"
#include "knot/nameserver/name-server.h" // ns_serial_compare() - TODO: extract
#include "libknot/updates/xfr-in.h"
#include "knot/updates/xfr-in.h"
#include "common/descriptor.h"
/*----------------------------------------------------------------------------*/
......@@ -496,7 +496,7 @@ static int knot_ddns_check_update(const knot_rrset_t *rrset,
*rcode = KNOT_RCODE_NOTZONE;
return KNOT_EOUTOFZONE;
}
if (knot_rrtype_is_ddns_forbidden(rrset->type)) {
*rcode = KNOT_RCODE_REFUSED;
log_zone_error("Refusing to update DNSSEC-related record!\n");
......@@ -745,7 +745,6 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
knot_rrset_set_rrsigs(removed, NULL);
}
/* c) And remove it from the node. */
UNUSED(knot_node_remove_rrset(node, KNOT_RRTYPE_CNAME));
......@@ -949,7 +948,6 @@ static int knot_ddns_add_rr_merge_normal(knot_rrset_t *node_rrset_copy,
knot_rrset_deep_free(rr_copy, 1);
if (rdata_in_copy == deleted_rrs) {
/* All RDATA have been removed, because they were duplicates
* or there were none (0). In general this means, that no
......@@ -1330,7 +1328,7 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
dbg_ddns("Failed to add RRSet to changes.\n");
return ret;
}
// Do the same with its RRSIGs (automatic drop)
if (rrset_copy->rrsigs) {
ret = knot_changes_add_rrset(changes,
......
......@@ -27,7 +27,7 @@
#ifndef _KNOT_DDNS_H_
#define _KNOT_DDNS_H_
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "knot/zone/zone.h"
#include "libknot/packet/pkt.h"
#include "libknot/rrset.h"
......
......@@ -20,7 +20,7 @@
#include "knot/server/journal.h"
#include "libknot/updates/xfr-in.h"
#include "knot/updates/xfr-in.h"
#include "knot/nameserver/name-server.h"
#include "libknot/packet/wire.h"
......@@ -32,7 +32,7 @@
#include "libknot/dnssec/zone-sign.h"
#include "libknot/dnssec/random.h"
#include "libknot/common.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "libknot/tsig.h"
#include "libknot/tsig-op.h"
#include "knot/zone/semantic-check.h"
......@@ -40,7 +40,6 @@
#include "common/descriptor.h"
#include "libknot/rdata.h"
/*----------------------------------------------------------------------------*/
/* Non-API functions */
/*----------------------------------------------------------------------------*/
......@@ -345,7 +344,6 @@ static int xfrin_check_tsig(knot_pkt_t *packet, knot_ns_xfr_t *xfr,
xfr->tsig_prev_time_signed =
tsig_rdata_time_signed(packet->tsig_rr);
}
} else if (packet->tsig_rr != NULL) {
// TSIG where it should not be
......@@ -410,7 +408,6 @@ static int xfrin_take_rr(const knot_pktsection_t *answer, knot_rrset_t **rr, uin
return ret;
}
/*----------------------------------------------------------------------------*/
static bool semantic_check_passed(const knot_zone_contents_t *z,
......@@ -684,7 +681,7 @@ dbg_xfrin_exec_verb(
ret = xfrin_take_rr(answer, &rr, &rr_id);
continue;
}
knot_node_t *(*get_node)(const knot_zone_contents_t *,
const knot_dname_t *) = NULL;
int (*add_node)(knot_zone_contents_t *, knot_node_t *, int,
......@@ -740,7 +737,7 @@ dbg_xfrin_exec_verb(
knot_rrset_deep_free(&rr, 1);
return ret;
}
if (!semantic_check_passed(zone, node)) {
xfrin_log_error(xfr->zone->name,
rr,
......@@ -2182,7 +2179,6 @@ static int xfrin_apply_replace_soa(knot_zone_contents_t *contents,
assert(node != NULL);
int ret = xfrin_replace_rrset_in_node(node, chset->soa_to, changes,
contents);
if (ret == KNOT_EOK) {
......
......@@ -34,7 +34,7 @@
#include "knot/zone/zone.h"
#include "libknot/packet/pkt.h"
#include "knot/nameserver/name-server.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
/*----------------------------------------------------------------------------*/
......
......@@ -20,7 +20,7 @@
#include <stdint.h>
#include "knot/zone/zone-contents.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
/*!
* \brief Create diff between two zone trees.
......
......@@ -32,7 +32,7 @@
#include <stdint.h>
#include "knot/zone/zone-contents.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
/*!
* \brief Parameters to be used when fixing NSEC(3) chain.
......
......@@ -29,7 +29,7 @@
#define _KNOT_DNSSEC_ZONE_EVENTS_H_
#include "knot/zone/zone.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "libknot/dnssec/policy.h"
/*!
* \brief DNSSEC resign zone, store new records into changeset. Valid signatures
......
......@@ -30,7 +30,7 @@
#define _KNOT_DNSSEC_ZONE_NSEC_H_
#include <stdbool.h>
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "knot/zone/zone-contents.h"
#include "libknot/dnssec/policy.h"
#include "libknot/dnssec/zone-keys.h"
......
......@@ -33,7 +33,7 @@
#include "libknot/dnssec/zone-sign.h"
#include "libknot/rdata.h"
#include "libknot/rrset.h"
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "libknot/util/debug.h"
#include "knot/zone/node.h"
#include "knot/zone/zone-contents.h"
......
......@@ -29,7 +29,7 @@
#ifndef _KNOT_DNSSEC_ZONE_SIGN_H_
#define _KNOT_DNSSEC_ZONE_SIGN_H_
#include "libknot/updates/changesets.h"
#include "knot/updates/changesets.h"
#include "knot/zone/zone.h"
#include "knot/zone/zone-contents.h"
#include "libknot/dnssec/zone-keys.h"
......
Markdown is supported
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