nat: improve icmp type detection performance