1997-04-25 05:01:06 +00:00
|
|
|
*** sshconnect.c.orig Wed Apr 23 08:40:11 1997
|
|
|
|
--- sshconnect.c Fri Apr 25 12:41:59 1997
|
1996-08-12 14:17:53 +00:00
|
|
|
***************
|
1997-04-25 05:01:06 +00:00
|
|
|
*** 311,316 ****
|
|
|
|
--- 311,322 ----
|
1996-08-12 14:17:53 +00:00
|
|
|
{
|
|
|
|
struct sockaddr_in sin;
|
|
|
|
int p;
|
|
|
|
+ #if defined(__FreeBSD__) && !defined(SOCKS)
|
1996-12-27 08:42:41 +00:00
|
|
|
+ p = 1023; /* Compat with old FreeBSD */
|
1996-08-12 14:17:53 +00:00
|
|
|
+ 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);
|
|
|
|
***************
|
1997-04-25 05:01:06 +00:00
|
|
|
*** 338,343 ****
|
|
|
|
--- 344,350 ----
|
1996-08-12 14:17:53 +00:00
|
|
|
}
|
|
|
|
fatal("bind: %.100s", strerror(errno));
|
|
|
|
}
|
|
|
|
+ #endif
|
|
|
|
debug("Allocated local port %d.", p);
|
|
|
|
}
|
|
|
|
else
|