Nameserver answering + changes to zn and zdb.
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.
Showing
- src/server/name-server.c 136 additions, 21 deletionssrc/server/name-server.c
- src/zone/zone-data-structure.c 1 addition, 1 deletionsrc/zone/zone-data-structure.c
- src/zone/zone-data-structure.h 1 addition, 1 deletionsrc/zone/zone-data-structure.h
- src/zone/zone-database.c 59 additions, 41 deletionssrc/zone/zone-database.c
- src/zone/zone-database.h 17 additions, 1 deletionsrc/zone/zone-database.h
- src/zone/zone-node.c 39 additions, 1 deletionsrc/zone/zone-node.c
- src/zone/zone-node.h 26 additions, 1 deletionsrc/zone/zone-node.h
Loading
Please register or sign in to comment