[PATCH 5/8] fwd: Share port scanning logic between init and timer cases