rm extra if; add missing expr for ipv6 subnet