Fix an issue where the port for p->ourip was being set to 0.