replaced $ip_cnet with $ip_addr; using netaddr gem