Skip to content
Snippets Groups Projects
  1. Aug 26, 2010
    • Lubos SLovak's avatar
      Saving referrer to nodes. · 2bc1c87e
      Lubos SLovak authored
      Zone node now keeps track of other nodes that hold some referrence
        to it (e.g. through CNAME or additional records).
      Added function zn_add_referrer() to set referrer for given type.
      Removed function zn_add_ref_cname() and its functionality merged to
        zn_add_ref().
      2bc1c87e
  2. Aug 25, 2010
  3. Aug 24, 2010
    • Lubos SLovak's avatar
      Fixed setting of max packet size. · 90c4733a
      Lubos SLovak authored
      If EDNS is enabled and the sender supports it, maximum packet size
        is set to minimum of the sender's and nameserver's EDNS UDP
        payload.
      
      Fixed typo in zn_add_ref_cname().
      90c4733a
    • Lubos SLovak's avatar
      Truncation & EDNS0. · 4ce5f6d0
      Lubos SLovak authored
      Counting truncation while adding RRSets into the packet.
      Some RRSets are added/omitted as a whole, some per RR (should
        change later maybe).
      Using the edns_udp_payload field of the packet to hold maximum
        allowed size for the packet. Overriding before converting to wire
        format.
      RRSets' size is counted by iterating over RRs - this is redundant,
        we may also copy the RRs in the same time (which would however
        result in having incomplete RRSets in the response).
      Setting TC bit when omitting referral NS, glue or anything from
        Answer section.
      4ce5f6d0
  4. Aug 23, 2010
    • Lubos SLovak's avatar
      Memory leaks fixed. · afbf8700
      Lubos SLovak authored
      Skip list (skip_destroy_list())  was not freeing the head.
      Dispatcher (dpt_destroy()) was not freeing routine_obj.
      Nameserver (ns_destroy()) was not freeing error response.
      Zone node (zn_destroy()) was not destroying the skip list of
        additional records.
      Zone node (zn_add_ref()) was not deleting the created
        zn_ar_rrsets structure if the value was merged in skip_insert().
      
      Zone database destroying changed to delete zone nodes (because
        not all zone nodes are in the zone data structure).
      zds_destroy() modified to have the zone node destructor as param.
      afbf8700
    • Lubos SLovak's avatar
      Fixed crash on double free when exiting. · 3293692d
      Lubos SLovak authored
      The key of hash table item was deallocated twice - once as the key
        and once in the zone node (the value). Fixed by adding parameters
        to ck_destroy_table() and ck_remove_item() which tells if the
        key and value should be deallocated (in case of value a pointer
        to destructor is passed).
      
      Changes to other files to acommodate this change.
      3293692d
  5. Aug 22, 2010
  6. Aug 20, 2010
  7. Aug 19, 2010
    • Lubos Slovak's avatar
      Glue wildcard records processing. · 9db6920b
      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)
      9db6920b
    • Lubos Slovak's avatar
      CNAME following in Additional section. · b893312e
      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.
      b893312e
    • Lubos Slovak's avatar
      Bugfixes + wildcard nodes used when adjusting zone · b160d488
      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.
      b160d488
    • Lubos Slovak's avatar
      Changes in CNAME adjusting and resolving. · 5a51c422
      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.
      5a51c422
  8. Aug 18, 2010
    • Lubos Slovak's avatar
      Probably all other memory leaks fixed. · d1bfc563
      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().
      d1bfc563
    • Lubos Slovak's avatar
      Memory leak fixed. · 0fb2c7ca
      Lubos Slovak authored
      The copied question section in ns_create_empty_response() was
        never deallocated. Now the question section is not copied.
      0fb2c7ca
    • Lubos Slovak's avatar
      Minor bugfixes. · c7465c09
      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!!!
      c7465c09
    • Lubos Slovak's avatar
      Wildcard processing in ANSWER section. · 97e7dcdf
      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().
      97e7dcdf
    • 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
  9. Aug 17, 2010
    • Lubos Slovak's avatar
      Additonal data for MX queries handling. · 417d9ecb
      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.
      417d9ecb
    • Lubos Slovak's avatar
      Minor bugfixes. · 6add3650
      Lubos Slovak authored
      Zone node get_ref_* functions now return NULL if there is no such
        reference in the node.
      6add3650
Loading