Commit graph

32 commits

Author SHA1 Message Date
Jan Vcelak
c95bb95175 global whitespace cleanup
Change-Id: I429b3833c5db9e78220beb1ea72980b557ba06c4
2013-04-26 13:19:39 +02:00
Daniel Salzman
614688441c samples: simplify example zone files 2013-04-06 12:23:10 +02:00
Jan Kadlec
1df52793be Re-signed example.com zone, fixed typos in it as well. 2012-02-10 13:43:12 +01:00
Jan Kadlec
db1f38832c Merge branch 'post-release' into development
Conflicts:
	libknot/nameserver/name-server.c
	libknot/zone/node.c
	libknot/zone/zone.c
	src/common/slab/slab.c
	src/knot/server/zones.c
	src/knot/zone/zone-dump.c
	src/zcompile/zcompile.c
2011-10-05 08:41:59 +02:00
Lubos Slovak
76aa9f5b3a Fixed CNAME with wildcard cycling problem.
- The canonical domain name was not taken from the CNAME RRSet in
  zone, but from the one synthetized from the wildcard. This caused
  the node's owner to be different than the CNAME name.
- Added the case causing the cycling in to the example.com zone.

fixes #1313 @1h30m
2011-09-22 18:13:31 +02:00
Jan Kadlec
bfa21d1cfe Merge remote branch 'origin/code-review' into code-review-merge-squash
Conflicts:
Merged branch code-review into branch squash (based on development). HUGE merge, with tons of conflicts, will not work.
	libknot/util/utils.c
	libknot/util/utils.h
	src/dnslib/dname-table.c
	src/dnslib/dname-table.h
	src/dnslib/node.c
	src/dnslib/node.h
	src/dnslib/zone-load.c
	src/dnslib/zone.c
	src/knot/zone/zone-dump.c
	src/zcompile/zcompile.c
	src/zcompile/zcompile.h
	src/zcompile/zlexer.l
	src/zcompile/zparser.y
2011-08-31 19:35:43 +02:00
Lubos Slovak
9f760827f6 Added a lot of debug output. 2011-07-05 14:14:43 +02:00
Lubos Slovak
a4273e42e7 Special handling of RRSIGs and NSEC3s in AXFR-in.
- The AXFR-in processing function seems to work quite OK now,
  but needs extensive testing.
- Modified test zone file (shorter times).

refs #875 @1h45m
2011-06-24 15:56:32 +02:00
Jan Kadlec
5dc4eb6f35 Experiments with zone freeing using dname table. 2011-06-16 11:02:17 +02:00
Jan Kadlec
68dae9c076 Fixed leaks in zoneparser.
Fixes #823 @3h
2011-05-05 15:20:36 +02:00
Lubos Slovak
8b951e7dc2 Fixes to sample files. 2011-05-02 09:58:22 +02:00
Jan Kadlec
d5f7ece887 Modification to zone dump.
Added check to zcompile.
Refs #713 #709 @40m
2011-04-06 14:55:32 +02:00
Lubos Slovak
7ef7d2f61c Modified answering algorithm + fixed DNSKEY adding
- Infinite loop replaced by several labels and gotos.
- This fixed problems with CNAME resolving related to closest
  enclosers saved in dname.node.
- Fixed DNSKEY adding - was not checking if the RRSet is there.

TODO: Try to refactor the answering code
TODO: Simplify DNSSEC records adding by marking the zone as signed
      / unsigned.

fixes #640
2011-03-15 11:53:59 +01:00
Lubos Slovak
645d058bdc Printing node->nsec3_node + sample NSEC3 zone file
- Added sample zone file for example.com zone signed with NSEC3.

refs #425
2011-03-01 10:52:55 +01:00
Lubos Slovak
0ea883b981 Sample zone file edited and signed.
- Edited to conform to zonesigner requirements.
2011-02-17 14:07:14 +01:00
Jan Kadlec
f1dc9a3d3b Leak related changes. Still has an issue when zone file contains $ORIGIN directive. 2010-12-31 09:59:27 +01:00
Lubos Slovak
932fcb81a2 Minor fixes in answering.
When processing DNAME, the actual qname should be used instead of
  the one from the query (e.g. when after CNAME).
Saving the actual qname before stripping and using it in DNAME and
  wildcard processing.
2010-09-27 13:23:57 +02:00
Lubos Slovak
7d8ea5415b Minor fix (end processing after DNAME). 2010-09-27 13:00:23 +02:00
Lubos Slovak
d3128685dc Fixed answering (wildcards & CNAMEs). 2010-09-27 11:39:32 +02:00
Lubos Slovak
05dd8ff90a Rewrite of the answering algorithm (ns_answer()).
There are probably multiple bugs, needs a lot of testing and
  revision of the algorithm.
However, it should mirror the current state of the flowchart
  (230910-my).
2010-09-23 15:07:52 +02:00
Lubos Slovak
489ca8722c DNAME substitution length check added. 2010-09-22 17:36:18 +02:00
Lubos Slovak
85ef5a7047 Fixed answering to work with empty non-terminals.
If all labels matched & the node is empty non-terminal, continue
  the search.
If some labels matched & the node has no wildcard node, return
  NXDOMAIN.
2010-09-22 17:06:59 +02:00
Lubos Slovak
17cafd3186 Adding empty non-terminals to zone.
Empty non-terminals are created after creating the zone list and
  before inserting into ZDS. The algorithm is quite straightforward
  - for each node it finds a 'parent' node and creates all nodes
    'missing' between the parent and the node. Search for parent
    optimized by saving the last parent + jumping directly to zone
    apex if number of common labes is equal to size of the zone
    apex' owner name.

Added function zn_is_empty().
Skipping empty nodes when processing non-authoritative nodes.
2010-09-22 15:07:33 +02:00
Lubos Slovak
9055f65fca DNAME support.
Changed answering algorithm so that DNAME is checked before
  wildcard and zone apex.
  (See query-processing-flowchart-200910-2.png.)
Implemented CNAME from DNAME synthesis - quite dumb, with a lot of
  copying (because of ldns).
2010-09-20 16:07:42 +02:00
Lubos SLovak
cb9a676c33 Processing of GLUEs not found in the delegation.
GLUEs found in authoritative data are extracted, those found in
  other delegations are ignored (out-of-bailiwick).
Adjusting of zone node ends after it finds CNAME or delegation.
2010-08-25 14:10:22 +02:00
Lubos SLovak
7809fa7d57 A/AAAA for SRV adjusting & processing.
Zone adjustments now add A/AAAA references for SRV records.
Nameserver adds these records to Additional section.
Modified zone node flags (now 16 bit).
2010-08-25 11:24:53 +02:00
Lubos Slovak
9db6920bb2 Glue wildcard records processing.
ns_put_glues() now copies the glues one by one and if a wildcard
  is encountered, the RR is copied and owner is replaced by name
  found by searching through the NS RRs in Authority section.
  (This approach should be faster than using the zn_get_glue()
   method for each name and type as in that case we would need to
   always iterate through the Authority section and in each
   iteration iterate over the glue records.)

zn_get_glue() now processes wildcard glue records. (The function
  however is not used right now.)

Fix in zdb_process_nonauth() (should not free the list of names).
Changed zdb_dname_list_contains() to zdb_dname_list_find() which
  returns the found name. Not utilized now. (May change back later)
2010-08-19 17:15:01 +02:00
Lubos Slovak
b893312e4d CNAME following in Additional section.
Function ns_follow_cname() generalized to put RRs to given section.

Once again putting RRSets to packet separated into generic function
  ns_put_rrset(), now with wildcard processing.

ns_put_additional() now puts all additional RRSets into the packet,
  not only for given type (either way was iterating through the
  whole Answer section).
ns_put_additional() now processes CNAMEs.

zdb_adjust_additional() now saves also pointer to node with CNAME
  record, to be used in answering.

Structure zn_ar_rrsets modified to be able to hold pointer to CNAME
  node. TODO: consider using union to save space.

Added zn_add_ref_cname() to add CNAME additional reference.
  TODO: is copy-pasted from zn_add_ref(), consider refactoring.
2010-08-19 15:35:15 +02:00
Lubos Slovak
5a51c4222b Changes in CNAME adjusting and resolving.
Was not marking the node as CNAME if the canonical name node was
  not present.
Was not copying the last CNAME record in chain if the next
  canonical name was not present.
2010-08-19 13:38:37 +02:00
Lubos Slovak
97e7dcdfe9 Wildcard processing in ANSWER section.
Query processing changed to accomodate proper wildcard processing
  (see the new flowchart). Used one ugly goto, but cannot think
  about any workaround right now.

If a wildcard is encountered when getting answers (or resolving
  CNAME chain), the corresponding RRs are now copied into the
  response packet and saved to a list of copied RRs for further
  deallocation.

Removed ns_put_rrset(), as in case of answers we needed to perform
  the wildcard checks.

Fix: Freeing of the copied qname in ns_answer().
2010-08-18 12:15:20 +02:00
Lubos Slovak
dbfb844069 Fixed zone node list in zdb and empty response.
zdb_create_list() was inserting the nodes in reverse order
  (ldns_rr_list_pop_rrset() pops LAST RRSet, not first!).

Empty response was used for responding to all queries, though
  it lacked data copied from the query. Now copies ID, Question,
  and RD bit if a query is given.

Added a lot of debug ouput in zdb.
Added delegation point and glue A records to example zone file.
2010-08-10 16:42:54 +02:00
Lubos Slovak
7d7fc02381 ns_answer_request() returning error response.
ns_create_response() divided into ns_create_empty_response()
  (empty response may be used as an error response) and
  ns_fill_response().
Added another sample zone as ldns had problems parsing the bogus25
  zone.
2010-08-09 09:35:49 +02:00