Skip to content
Snippets Groups Projects
  1. Aug 18, 2010
    • Lubos Slovak's avatar
      Additional section processing improvements. · 0d2b3c34
      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.
      0d2b3c34
    • Lubos Slovak's avatar
      MX additional records code refactoring. · 5cc7bb69
      Lubos Slovak authored
      zdb_adjust_mx() converted to generic zdb_adjust_additional().
      Fixed typo in zn_add_ref_ns().
      5cc7bb69
  2. Aug 17, 2010
  3. Aug 13, 2010
    • Lubos Slovak's avatar
      Bugfix - ns_answer_request() deleting zone data. · 2b38198a
      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 :-)
      2b38198a
    • Lubos Slovak's avatar
      Fixed CNAME and delegation point adjusting. · 7c3335d4
      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.
      7c3335d4
    • Lubos Slovak's avatar
      Zone adjusting in zdb_insert_name(). · a9281439
      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!!
      a9281439
  4. Aug 12, 2010
    • Lubos Slovak's avatar
      Zone adjusting (CNAMEs and glue RRs). · 48c7b9a2
      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).
      48c7b9a2
    • Lubos Slovak's avatar
      Adding authority NS RRSet to answers. · dcabdaf6
      Lubos Slovak authored
      dcabdaf6
    • Lubos Slovak's avatar
      Nameserver answering improvements ctd. · 102a9e48
      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.
      102a9e48
    • Lubos Slovak's avatar
      Nameserver answering + changes to zn and zdb. · 468e2e57
      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.
      468e2e57
  5. Aug 10, 2010
    • Lubos Slovak's avatar
      Code refactoring. · cc0e08d6
      Lubos Slovak authored
      cc0e08d6
    • Lubos Slovak's avatar
      Fixed zone node list in zdb and empty response. · dbfb8440
      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.
      dbfb8440
  6. Aug 09, 2010
    • Lubos Slovak's avatar
      Nameserver improvements. · 9d6409e5
      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.
      9d6409e5
    • Lubos Slovak's avatar
      Removed usage of dns-simple. · 5918bd50
      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).
      5918bd50
    • Lubos Slovak's avatar
      8b853d75
    • Lubos Slovak's avatar
      ns_answer_request() returning error response. · 7d7fc023
      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.
      7d7fc023
    • Lubos Slovak's avatar
      Fixed zdb_add_zone(). · 00fabb98
      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).
      00fabb98
  7. Aug 06, 2010
    • Lubos Slovak's avatar
      Zone parser now parses BIND zone files. · d549bb38
      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.
      d549bb38
    • Lubos Slovak's avatar
      Major changes to zone database. · c851b8c1
      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.
      c851b8c1
    • Lubos Slovak's avatar
      Minor changes. · 6edad31e
      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().
      6edad31e
    • Lubos Slovak's avatar
      Modified nameserver to use ldns. · 8da78e95
      Lubos Slovak authored
      Changed nameserver's API - function ns_answer_request() to conform
        the ldns type usage.
      8da78e95
  8. Aug 05, 2010
    • Lubos Slovak's avatar
      Modified zds and zdb to use ldns. · f1f98612
      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.
      f1f98612
    • Lubos Slovak's avatar
      Added dns-utils for functions not found in ldns. · 13d67361
      Lubos Slovak authored
      Currently only a function for matching labels in two domain names
        is implemented. May need some revision and testing!
      13d67361
  9. Aug 04, 2010
    • Lubos Slovak's avatar
      Zone node modified to use ldns. Not functional now · 1144fbde
      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.
      1144fbde
    • Lubos Slovak's avatar
      Modifications & bugfix in skip list. · 508f6c3e
      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.
      508f6c3e
    • Lubos Slovak's avatar
      Skip list modifications and test. · c264f9d7
      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.
      c264f9d7
  10. Aug 03, 2010
  11. Jul 28, 2010
  12. Jul 27, 2010
    • Lubos Slovak's avatar
      Test of dynamic array added. · 8f553e18
      Lubos Slovak authored
      The da_resize() function sometimes crashes on either invalid
        pointer or double free error. TODO: FIX!
      8f553e18
    • Lubos Slovak's avatar
      Minor refactoring + zds_remove implemented. · 02238c25
      Lubos Slovak authored
      ck_rehash() is not part of the API if CT_TEST_REHASH is not
        defined
      02238c25
    • Lubos Slovak's avatar
      Fixed and modified dynamic array, fixes in cuckoo hash · c283b53d
      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!
      c283b53d
Loading