ai_canonname is NULL for every endpoint node but the first one; this causes a segfault when the name is used within strdup(...); in situations where ai_canonname is NULL; strdup(...) is called on the ai_canonname of the first node; in siutations where ai_canonname of the first node is also NULL; the input hostname is used for the ai_canonname field