ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()