mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
67faab29d6
ignores it's argument (it's meaningless, the kernel keeps the state), but 2.1.x use it. ssh was effectively giving a random port to 2.1. Originally noticed by: John Polstra <jdp@polstra.com>
28 lines
660 B
Plaintext
28 lines
660 B
Plaintext
*** sshconnect.c.dist Thu Jun 6 21:47:06 1996
|
|
--- sshconnect.c Mon Aug 12 13:26:46 1996
|
|
***************
|
|
*** 235,240 ****
|
|
--- 235,246 ----
|
|
{
|
|
struct sockaddr_in sin;
|
|
int p;
|
|
+ #if defined(__FreeBSD__) && !defined(SOCKS)
|
|
+ p = 1023; /* Compat with old FreeBSD */
|
|
+ sock = rresvport(&p);
|
|
+ if (sock < 0)
|
|
+ fatal("rresvport: %.100s", strerror(errno));
|
|
+ #else
|
|
for (p = 1023; p > 512; p--)
|
|
{
|
|
sock = socket(AF_INET, SOCK_STREAM, 0);
|
|
***************
|
|
*** 262,267 ****
|
|
--- 267,273 ----
|
|
}
|
|
fatal("bind: %.100s", strerror(errno));
|
|
}
|
|
+ #endif
|
|
debug("Allocated local port %d.", p);
|
|
}
|
|
else
|