FreeBSD doesn't have a fixed range of reserved ports, although it still
has IPPORT_RESERVED for compatibility; instead, the last reserved port
number is indicated by the net.inet.ip.portrange.reservedhigh sysctl,
which defaults to IPPORT_RESERVED - 1.

The attached patch modifies add_local_forward() to use this sysctl
instead of IPPORT_RESERVED on FreeBSD.

Dag-Erling Smørgrav -

openssh-unix-dev mailing list