Fix iptoname and nametoip functions