diff options
author | brian <brian@FreeBSD.org> | 1997-05-23 05:22:48 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-05-23 05:22:48 +0000 |
commit | 33deb302feea8aae1099d3a563d218206f1841a0 (patch) | |
tree | 2cc46ce4b6758a4c46acf75161f5953648f460b5 /usr.sbin/ppp/main.c | |
parent | 6d0cdc4cfb3fa176c7652dec4a5d653682c90b2a (diff) | |
download | FreeBSD-src-33deb302feea8aae1099d3a563d218206f1841a0.zip FreeBSD-src-33deb302feea8aae1099d3a563d218206f1841a0.tar.gz |
Add SO_REUSEADDR socket opt in case the last telnet
connection is in a time_wait.
Submitted by: Brian Campbell <brianc@pobox.com>
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r-- | usr.sbin/ppp/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 06e5042..0193d92 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -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) |