Fix get_connection_dns function