- return new_fd_pstream(bound_name, fd, ptcp_accept, set_dscp, NULL,
- pstreamp);
+ error = new_fd_pstream(bound_name, fd, ptcp_accept, set_dscp, NULL,
+ pstreamp);
+ if (!error) {
+ pstream_set_bound_port(*pstreamp, sin.sin_port);
+ }
+ return error;