cuda_iplookup: fixed minor bugs