- Aug 19, 2010
-
-
Lubos Slovak authored
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)
-
Lubos Slovak authored
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.
-
Lubos Slovak authored
Fix: CNAME following was processing even the last (canonical name) node. Fix: ns_put_answer() was completely omitting answers when they're not wildcards. zdb_find_name_in_list() edited to accept also wildcard nodes.
-
Lubos Slovak authored
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.
-
- Aug 18, 2010
-
-
Lubos Slovak authored
Not freeing the * domain name when creating wildcard name. Not freeing the packet wire format data returned by ldns_pkt2wire() in ns_response_to_wire(). Not freeing the ldns_pkt structure when creating error packet in ns_create().
-
Lubos Slovak authored
The copied question section in ns_create_empty_response() was never deallocated. Now the question section is not copied.
-
Lubos Slovak authored
ns_create_empty_response() was copying the question RR list, but this was never deallocated. ns_follow_cname() saved the RR to the list of copied RRs even if it was not copied. Freeing of the created wildcard name in ns_answer(). BUG: still major memory leaks present!!!
-
Lubos Slovak authored
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().
-
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
-