udp: Fix local_port management