mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 15:44:04 +01:00
Add SO_REUSEADDR socket opt in case the last telnet
connection is in a time_wait. Submitted by: Brian Campbell <brianc@pobox.com>
This commit is contained in:
parent
6db75539f1
commit
c9bf343a4f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=26032
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: main.c,v 1.53 1997/05/19 03:02:36 brian Exp $
|
||||
* $Id: main.c,v 1.54 1997/05/23 04:54:03 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Add commands for traffic summary, version display, etc.
|
||||
@ -429,6 +429,7 @@ char **argv;
|
||||
ifsin.sin_family = AF_INET;
|
||||
ifsin.sin_addr.s_addr = INADDR_ANY;
|
||||
ifsin.sin_port = htons(port);
|
||||
setsockopt(server, SOL_SOCKET, SO_REUSEADDR, &server, sizeof server);
|
||||
if (bind(server, (struct sockaddr *) &ifsin, sizeof(ifsin)) < 0) {
|
||||
perror("bind");
|
||||
if (errno == EADDRINUSE)
|
||||
|
Loading…
Reference in New Issue
Block a user