summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-03-07 11:54:43 +0000
committerbrian <brian@FreeBSD.org>1999-03-07 11:54:43 +0000
commit89abf4706b304c059d0a92f79e44fd4cd6130b07 (patch)
treec3d769a4ec93a7931021acb127af522f0c5a1e83 /usr.sbin/ppp
parent01a9befa3a11e979e5f76a6eb914396b254a7c00 (diff)
downloadFreeBSD-src-89abf4706b304c059d0a92f79e44fd4cd6130b07.zip
FreeBSD-src-89abf4706b304c059d0a92f79e44fd4cd6130b07.tar.gz
Correctly drop existing connections when reopening the diagnostic
socket.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/log.c14
-rw-r--r--usr.sbin/ppp/ppp.88
-rw-r--r--usr.sbin/ppp/ppp.8.m48
-rw-r--r--usr.sbin/ppp/server.c4
4 files changed, 20 insertions, 14 deletions
diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c
index 90cedb8..93cea2e 100644
--- a/usr.sbin/ppp/log.c
+++ b/usr.sbin/ppp/log.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: log.c,v 1.34 1998/08/09 15:34:11 brian Exp $
+ * $Id: log.c,v 1.35 1998/08/21 18:10:14 brian Exp $
*/
#include <sys/types.h>
@@ -132,15 +132,21 @@ log_UnRegisterPrompt(struct prompt *prompt)
void
log_DestroyPrompts(struct server *s)
{
- struct prompt *p, *pn;
+ struct prompt *p, *pn, *pl;
p = promptlist;
+ pl = NULL;
while (p) {
pn = p->next;
- if (s && p->owner != s) {
+ if (s && p->owner == s) {
+ if (pl)
+ pl->next = p->next;
+ else
+ promptlist = p->next;
p->next = NULL;
prompt_Destroy(p, 1);
- }
+ } else
+ pl = p;
p = pn;
}
}
diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8
index 77b26bf..393120a 100644
--- a/usr.sbin/ppp/ppp.8
+++ b/usr.sbin/ppp/ppp.8
@@ -1,4 +1,4 @@
-.\" $Id: ppp.8,v 1.153 1999/03/03 23:00:40 brian Exp $
+.\" $Id: ppp.8,v 1.154 1999/03/04 17:42:15 brian Exp $
.Dd 20 September 1995
.nr XX \w'\fC00'
.Os FreeBSD
@@ -3981,9 +3981,9 @@ to close any existing socket.
If you wish to specify a local domain socket,
.Ar LocalName
must be specified as an absolute file name, otherwise it is assumed
-to be the name or number of a TCP port. You may specify the octal umask that
-should be used with local domain sockets as a four character octal number
-beginning with
+to be the name or number of a TCP port. You must specify the octal umask
+that should be used with local domain sockets as a four character octal
+number beginning with
.Sq 0 .
Refer to
.Xr umask 2
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index 77b26bf..393120a 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -1,4 +1,4 @@
-.\" $Id: ppp.8,v 1.153 1999/03/03 23:00:40 brian Exp $
+.\" $Id: ppp.8,v 1.154 1999/03/04 17:42:15 brian Exp $
.Dd 20 September 1995
.nr XX \w'\fC00'
.Os FreeBSD
@@ -3981,9 +3981,9 @@ to close any existing socket.
If you wish to specify a local domain socket,
.Ar LocalName
must be specified as an absolute file name, otherwise it is assumed
-to be the name or number of a TCP port. You may specify the octal umask that
-should be used with local domain sockets as a four character octal number
-beginning with
+to be the name or number of a TCP port. You must specify the octal umask
+that should be used with local domain sockets as a four character octal
+number beginning with
.Sq 0 .
Refer to
.Xr umask 2
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c
index 2a6ccfe7..5ae15f5 100644
--- a/usr.sbin/ppp/server.c
+++ b/usr.sbin/ppp/server.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: server.c,v 1.22 1998/06/27 14:18:10 brian Exp $
+ * $Id: server.c,v 1.23 1998/08/02 13:01:16 brian Exp $
*/
#include <sys/types.h>
@@ -191,6 +191,7 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask)
return 0;
}
+ server_Close(bundle);
memset(&server.ifsun, '\0', sizeof server.ifsun);
server.ifsun.sun_len = strlen(name);
if (server.ifsun.sun_len > sizeof server.ifsun.sun_path - 1) {
@@ -223,7 +224,6 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask)
ID0unlink(name);
return 5;
}
- server_Close(bundle);
server.fd = s;
server.rm = server.ifsun.sun_path;
log_Printf(LogPHASE, "Listening at local socket %s.\n", name);
OpenPOWER on IntegriCloud