Modify hashing function at condor_ipverify.cpp. Find a better hashing function for in6_addr. -{section: remaining sockaddr_in} +{section: NO_DNS re-implementation + +In case if you want to know the detail,... + +1) NO_DNS are transparently implemented over existing DNS functions. (gethostbyaddr -> condor_gethostbyaddr, ...) +2) These functions and structures are currently obsolete. The interfaces and the structures are limited to IPv4 or is not protocol independent. (Current IPv6 socket functions are all protocol independent - they can work on any layer 2 protocol) +3) If caller uses obsolete structure, it usually intertwined with caller's loop as well. (DNS structure usually contains linked list) +4) Condor offer same function in many different forms. (condor_gethostname+get_full_hostname, my_hostname, my_full_hostname are essentially same) Even with abundant of implementation, caller still needs to do housekeeping work by themselves. + +I carefully looked at each case and extracted common use cases. These are + +1) resolving single/all IP address for given hostname. +2) resolve DNS name for IP address with/without DNS aliases. + +It looks very simple and obvious. But, there were 5-6 different implementations on each of them. -*:ckpt_server/* -*:c++_util/network_adaptor.linux.cpp -*:c++_util/network_adaptor.unix.cpp -*:io/cedar_no_ckpt.cpp -*:schedd.V6/schedd.cpp -*:startd.V6/command.cpp -*:syscall_lib/filestream.c -*:stork/ {section: no modify sockaddr_in} *:amazon/ec2_sim_main.cpp - main() for testing *:c++_util/udp_waker.cpp - no broadcast for ipv6 {section: finished sockaddr_in} -*:io.std/std_univ_sock.cpp -*:startd.V6/VMManager.cpp -*:io/condor_auth_kerberos.cpp -*:schedd.V6/qmgmt.cpp -*:shadow.V6.1/mpishadow.cpp -*:c++_util/cbstp_url.cpp -*:c++_util/ftp_url.cpp -*:c++_util/http_url.cpp -*:collector.V6/soap_collectorStub.cpp -*:collector.V6/collector_engine.h/cpp -*:collector/hashkey.h/cpp - contains sockaddr_in but does not actually use sockaddr_in -*:daemon_core.V6/daemon_core.cpp - one remains due to GCB -*:daemon_core.V6/soap_core.cpp - sockaddr_in was used for logging port num -*:daemon_client/daemon.t.cpp - unused variable -*:daemon_client/daemon.cpp +conversion of sockaddr_in were all finished. {subsection: job log of collector_engine/hashkey} hashkey.h/cpp has sockaddr_in in function definition. But, the implementation does not use it all. @@ -72,6 +64,8 @@ The caveat is that sinful grammar is changing due to IPv6 address and these are simply incompatible. If the address is IPv6, it should be form of <[%s]:%s>. We need another abstraction layer. {section: Where to put NODNS?} +NO_DNS were completely re-implemented. Below are garbages. + Previously, NODNS is implemented over existing DNS query functions such as condor_gethostbyname, condor_gethostname, and condor_gethostbyaddr. In IPv6, this problem is little bit complicated because when you call getaddrinfo(), it will return a pointer to addrinfo structure. It should be released by the user code. Previously, gethostbyname() returned a pointer to static buffer, thus, the user is not liable to release.