- Aug 18, 2010
-
-
Lubos Slovak authored
Now adding additional A/AAAA records for NS and MX records in answer section. Rewritten ns_put_additional() - now puts only the desired records. Zone node API for saving and getting node references cleaned up: - zn_add_ref_*() and zn_get_ref_*() replaced by generic functions zn_add_ref() and zn_get_refs(). - redundant union members ns and mx replaced by generic member additional.
-
Lubos Slovak authored
zdb_adjust_mx() converted to generic zdb_adjust_additional(). Fixed typo in zn_add_ref_ns().
-
- Aug 17, 2010
-
-
Lubos Slovak authored
Added zdb_adjust_mx() for searching and saving A/AAAA RRSets corresponding to MX records in a node. Added ns_put_additional() for adding additional RRSets into the response. Currently supports only MX. Bugfix in skip_first() - was returning head instead of the first real item.
-
Lubos Slovak authored
Zone node get_ref_* functions now return NULL if there is no such reference in the node.
-
Lubos Slovak authored
Zone node now holds pointers to all A/AAAA RRSets corresponding to the node's MX or NS records. Zone node now holds an array of pointers to other zone nodes which are referencing this node via CNAME, MX or NS records. Added several API functions for manipulating all these references.
-
Lubos Slovak authored
-
Lubos Slovak authored
-
- Aug 13, 2010
-
-
Lubos Slovak authored
The response packet is filled with not-copied RRs, so we must free only the packet structure, not all RRs within it. (ldns_pkt_free() actually does deep free - should change!) Fixed delegation point adjusting (now was skipping the first non-auth node :-)
-
Lubos Slovak authored
CNAME adjusting function was searching for the canonical name in zone data structure, where the nodes may not be inserted yet. Deleg. point adjusting was causing the next node in list after non-auth to be skipped. Fixed some assertions. WARNING: BUG still present, but seems that extracting authority RRSet is causing the problems.
-
Lubos Slovak authored
Improved zdb_insert_node_to_zone(): - inserting into empty zone (must be SOA, checks if owner is the same as zone name) - checks if the node is not non-authoritative (subdomain of some delegation point), or delegation point (contains NS). Some code from zdb_adjust_delegation_point() separated to zdb_extract_ns() and zdb_process_nonauth() (used elsewhere). Added function zn_print_rrset(). WARNING: There's a BUG which somehow causes the data in zone nodes to be rewritten by data from the query!!
-
- Aug 12, 2010
-
-
Lubos Slovak authored
Zone database: Added functions - zdb_adjust_cname() - saves pointer to the node where the CNAME record points. - zdb_adjust_delegation_point() - marks node as delegation point, processes all its 'children', marks them as non authoritative and extracts all glue records from them. - zdb_adjust_zone() - uses the previous two functions to adjust all nodes in the zone. zdb_insert_name() modified to properly insert the node in its place. zdb_add_zone() modified to adjust the zone after creating. zdb_insert_nodes_into_zds() modified not to insert non authoritative nodes into the zone data structure. Zone node: New flag for zone node - 2 - if non-authoritative. (+ setter and getter) Glue list is now ldns_rr_list. zn_get_glue() changed to accept desired owner name. Added zn_get_glues() to get all glue records from the node. Added zn_push_glue() to add glue records to the node. The function also sorts the glue records on each call. Nameserver: Glue records adding slightly modified (inserting all glue RRs by default, should change in future).
-
Lubos Slovak authored
-
Lubos Slovak authored
Name server: - Referral responses. - SOA RRSet to response if name not found in zone. - Added some helper functions to keep the code more or less clean. Zone node: - cname pointer replaced by union of cname pointer and glue list pointer, - changed functions accordingly, added getters for cname node and glue records.
-
Lubos Slovak authored
Added functions: - ns_get_zone_for_qname() which returns proper zone for searching (special handling of DS queries), - ns_find_node_in_zone() which repeatedly strips leftmost label from the QNAME and searches in the zone, - ns_follow_cname() which resolves the CNAME chain and puts all CNAME records to the response packet, - ns_copy_answers() which puts the appropriate RRSet from a node to the response packet. Improved the ns_answer() function. Some cases remain TODO: - referral - adding SOA when name not found in zone - DNAME - wildcard zdb_find_zone_for_name() made public and zdb_find_name() changed to zdb_find_name_in_zone(). Sorting of zones in zone database in reverse canonical order (added function zdb_insert_zone() taking care of this). Added members to zn_node: - flags - CNAME pointer Added functions to zone node to get/set delegation point flag and to check if the node has CNAME.
-
- Aug 10, 2010
-
-
Lubos Slovak authored
-
Lubos Slovak authored
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.
-
- Aug 09, 2010
-
-
Lubos Slovak authored
Added members to ns_nameserver structure to keep pre-arranged error response in wire format and functions for using this response with proper rcode. Nameserver now replies always with a correct reply, except for when the query is less than 2 bytes, so the ID cannot be copied.
-
Lubos Slovak authored
Removed 3rd parameter of zdb_insert_name() - not used. Removed all usage of dns-simple from zone parser. Last usage of dns-simple remains in cuckoo-test (TODO: remove).
-
Lubos Slovak authored
-
Lubos Slovak authored
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.
-
Lubos Slovak authored
Now properly deleting the structures when adding fails. Changed return value of zdb_insert_name() when the zone was not found (from 1 to -2).
-
- Aug 06, 2010
-
-
Lubos Slovak authored
Added function zp_parse_zonefile_bind(). Changed the sample file to provide owner name for the SOA as no origin is given.
-
Lubos Slovak authored
Each zone now holds a linked list of all its nodes while these are at the same time in the main zone data structure. => added pointer to the zone apex to zdb_zone => added function zdb_add_zone() to add a zone in ldns_zone format to the database. Note: zdb_insert() does nothing with the given node, so it should be used only with nodes already in the list. TODO: Some way to add a new node to the zone should be provided. Added owner name and pointers to next and previous item in list to the zone node structure + added function zn_owner() for getting the node's owner. Changed API of zone-data-structure: zds_insert() now has only 2 arguments - the owner is in the node.
-
Lubos Slovak authored
Added function for checking skip list emptiness. Checking ldns_status returned from ldns_pkt2wire() in ns_answer_request(). Casting buffers to unsigned char * in call to ns_answer_request().
-
Lubos Slovak authored
Changed nameserver's API - function ns_answer_request() to conform the ldns type usage.
-
- Aug 05, 2010
-
-
Lubos Slovak authored
Zone data structure module now uses ldns structures in the API. Zone database module now uses ldns structures in the API and implementation. Zone parser and name server modules' iplementation slightly modified to be able to call zds and zdb functions. Minor fixes in dns-simple.
-
Lubos Slovak authored
Currently only a function for matching labels in two domain names is implemented. May need some revision and testing!
-
- Aug 04, 2010
-
-
Lubos Slovak authored
Some other functions had to be modified in order to be able to compile the program. However, it is not debugged, and currently does not work.
-
Lubos Slovak authored
Functions for merging values and printing items removed from the skip list structure. Now passed only to appropriate functions. Bugfix in skip_remove() - was not testing the node pointer for NULL.
-
Lubos Slovak authored
Added functions skip_delete_node for properly deleting skip_node skip_destroy_list for properly destroying whole skip list skip_print_list for printing the skip list. Changed return values of function skip_insert(). Renamed skip_delete() to skip_remove() and changed return value to int (successful / not found) Bugfix in skip_remove(). Added test of skip list.
-
- Aug 03, 2010
-
-
Lubos Slovak authored
Added 'key' parameter to skip_make_node function. Added checks for successful allocation. Added comments to all functions and structures.
-
Lubos Slovak authored
-
Lubos Slovak authored
-
Lubos Slovak authored
Skip list downloaded from http://en.literateprograms.org/Skip_list_(C)?oldid=12811 and modified to better suit our needs. Not tested nor compiled yet. Added sample zone for later testing.
-
Lubos Slovak authored
-
- Jul 28, 2010
-
-
Lubos Slovak authored
-
Lubos Slovak authored
Replacing int count = rand() % 10; with int count = rand() % 10 + 1; seems to do the trick, but really do not know why.
-
- Jul 27, 2010
-
-
Lubos Slovak authored
The da_resize() function sometimes crashes on either invalid pointer or double free error. TODO: FIX!
-
Lubos Slovak authored
ck_rehash() is not part of the API if CT_TEST_REHASH is not defined
-
Lubos Slovak authored
Fixed stash usage in ck_rehash() and ck_insert_item(): - cannot copy the pointer because the array may be reallocated - TODO: maybe use also rcu_dereference(). Changed way of working with dynamic array: - function da_reserve() only makes sure there is enough place in the array; added function da_occupy() to really increment the item count - fixed ck functions to use the array properly. Bugfix in ck_rehash(): - was not resizing the stash properly. Bugfixes in ck_dump_table(): - wrong accessing of items Bugfix in da_resize(): - was not copying the array contents!
-