nat: fix segv if out of ports in ed mode