lib: net_utils: make string_to_ip stricter