From cd4e9e32d0666df8ed2e87a499c16158a6a2e0b1 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Wed, 21 Nov 2012 14:45:29 +0100 Subject: Imported Upstream version 1.1.2 --- src/knot.conf.5 | 2 +- src/knot/server/zones.c | 11 ++++++----- src/knot/server/zones.h | 3 ++- src/knotc.8 | 2 +- src/knotd.8 | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/knot.conf.5 b/src/knot.conf.5 index 4c3f367..47daa25 100755 --- a/src/knot.conf.5 +++ b/src/knot.conf.5 @@ -1,4 +1,4 @@ -.TH "knot.conf" "5" "August 2012" "CZ.NIC Labs" "Knot DNS, version 1.1.2-rc1" +.TH "knot.conf" "5" "August 2012" "CZ.NIC Labs" "Knot DNS, version 1.1.2" .SH "NAME" .LP .B knot.conf diff --git a/src/knot/server/zones.c b/src/knot/server/zones.c index d993c49..930f611 100755 --- a/src/knot/server/zones.c +++ b/src/knot/server/zones.c @@ -1987,7 +1987,8 @@ static int zones_check_tsig_query(const knot_zone_t *zone, // if there is some TSIG in the query, find the TSIG associated with // the zone dbg_zones_verb("Checking zone and ACL.\n"); - int ret = zones_query_check_zone(zone, addr, tsig_key_zone, rcode); + int ret = zones_query_check_zone(zone, addr, tsig_key_zone, rcode, + knot_packet_opcode(query)); /* Accept found OR unknown key results. */ @@ -2191,7 +2192,8 @@ int zones_zonefile_sync(knot_zone_t *zone, journal_t *journal) /*----------------------------------------------------------------------------*/ int zones_query_check_zone(const knot_zone_t *zone, const sockaddr_t *addr, - knot_key_t **tsig_key, knot_rcode_t *rcode) + knot_key_t **tsig_key, knot_rcode_t *rcode, + uint8_t q_opcode) { if (addr == NULL || tsig_key == NULL || rcode == NULL) { dbg_zones_verb("Wrong arguments.\n"); @@ -2217,8 +2219,7 @@ int zones_query_check_zone(const knot_zone_t *zone, const sockaddr_t *addr, return KNOT_EACCES; } else { dbg_zones("zones: authorized query or request for " - "'%s %s'. match=%p\n", zd->conf->name, match, - q_opcode == KNOT_OPCODE_UPDATE ? "UPDATE":"XFR/OUT"); + "'%s %s'. match=%p\n", zd->conf->name, "XFR/OUT", match); if (match) { /* Save configured TSIG key for comparison. */ conf_iface_t *iface = (conf_iface_t*)(match->val); @@ -2253,7 +2254,7 @@ int zones_xfr_check_zone(knot_ns_xfr_t *xfr, knot_rcode_t *rcode) } return zones_query_check_zone(xfr->zone, &xfr->addr, &xfr->tsig_key, - rcode); + rcode, knot_packet_opcode(xfr->query)); } /*----------------------------------------------------------------------------*/ diff --git a/src/knot/server/zones.h b/src/knot/server/zones.h index 33b3d70..1ed724c 100755 --- a/src/knot/server/zones.h +++ b/src/knot/server/zones.h @@ -139,7 +139,8 @@ int zones_zonefile_sync(knot_zone_t *zone, journal_t *journal); * \todo Document me. */ int zones_query_check_zone(const knot_zone_t *zone, const sockaddr_t *addr, - knot_key_t **tsig_key, knot_rcode_t *rcode); + knot_key_t **tsig_key, knot_rcode_t *rcode, + uint8_t q_opcode); /*! * \todo Document me. diff --git a/src/knotc.8 b/src/knotc.8 index 9776ff7..3f87c3e 100755 --- a/src/knotc.8 +++ b/src/knotc.8 @@ -1,4 +1,4 @@ -.TH knotc "8" "August 2012" "CZ.NIC Labs" "Knot DNS, version 1.1.2-rc1" +.TH knotc "8" "August 2012" "CZ.NIC Labs" "Knot DNS, version 1.1.2" .SH NAME .B knotc \- Knot DNS control utility diff --git a/src/knotd.8 b/src/knotd.8 index 63eba6e..8504777 100755 --- a/src/knotd.8 +++ b/src/knotd.8 @@ -1,4 +1,4 @@ -.TH "knotd" "8" "August 2012" "CZ.NIC Labs" "Knot DNS, version 1.1.2-rc1" +.TH "knotd" "8" "August 2012" "CZ.NIC Labs" "Knot DNS, version 1.1.2" .SH NAME .B knotd \- Knot DNS daemon -- cgit v1.2.3