diff options
author | brian <brian@FreeBSD.org> | 1998-07-31 19:50:24 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-07-31 19:50:24 +0000 |
commit | 3c04e82e84aedd9b4e128d280b8abb831aaf0673 (patch) | |
tree | 45e30743c000ce2315ac38d259ca0b5ff844dc9e /usr.sbin | |
parent | ca7833d043e3fa9bdc4f9621ec6cf75c3665ca88 (diff) | |
download | FreeBSD-src-3c04e82e84aedd9b4e128d280b8abb831aaf0673.zip FreeBSD-src-3c04e82e84aedd9b4e128d280b8abb831aaf0673.tar.gz |
Always dial immediately on ``open'', ``dial'' and ``call''.
We don't need a ``!''.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/command.c | 21 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp.8 | 11 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp.8.m4 | 11 |
3 files changed, 12 insertions, 31 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index d78c743..69ca69c 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.156 1998/07/28 21:54:52 brian Exp $ + * $Id: command.c,v 1.157 1998/07/29 18:21:13 brian Exp $ * */ #include <sys/types.h> @@ -122,7 +122,7 @@ #define NEG_DNS 50 const char Version[] = "2.0"; -const char VersionDate[] = "$Date: 1998/07/28 21:54:52 $"; +const char VersionDate[] = "$Date: 1998/07/29 18:21:13 $"; static int ShowCommand(struct cmdargs const *); static int TerminalCommand(struct cmdargs const *); @@ -306,8 +306,7 @@ DialCommand(struct cmdargs const *arg) if (arg->argc > arg->argn && (res = LoadCommand(arg)) != 0) return res; - bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, - arg->cmd->args ? 1 : 0); + bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1); return 0; } @@ -458,10 +457,6 @@ static struct cmdtab const Commands[] = { "Deny option request", "deny option .."}, {"dial", "call", DialCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Dial and login", "dial|call [remote]", NULL}, - {NULL, "dial!", DialCommand, LOCAL_AUTH | LOCAL_CX_OPT, - "Dial and login", "dial! [remote]", (void *)1}, - {NULL, "call!", DialCommand, LOCAL_AUTH | LOCAL_CX_OPT, - "Dial and login", "call! [remote]", (void *)1}, {"disable", NULL, NegotiateCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Disable option", "disable option .."}, {"down", NULL, DownCommand, LOCAL_AUTH | LOCAL_CX_OPT, @@ -473,8 +468,6 @@ static struct cmdtab const Commands[] = { {"load", NULL, LoadCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Load settings", "load [remote]"}, {"open", NULL, OpenCommand, LOCAL_AUTH | LOCAL_CX_OPT, - "Open an FSM", "open [lcp|ccp|ipcp]", NULL}, - {NULL, "open!", OpenCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Open an FSM", "open! [lcp|ccp|ipcp]", (void *)1}, {"passwd", NULL, PasswdCommand, LOCAL_NO_AUTH, "Password for manipulation", "passwd LocalPassword"}, @@ -841,8 +834,7 @@ static int OpenCommand(struct cmdargs const *arg) { if (arg->argc == arg->argn) - bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, - arg->cmd->args ? 1 : 0); + bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1); else if (arg->argc == arg->argn + 1) { if (!strcasecmp(arg->argv[arg->argn], "lcp")) { struct datalink *cx = arg->cx ? @@ -851,8 +843,7 @@ OpenCommand(struct cmdargs const *arg) if (cx->physical->link.lcp.fsm.state == ST_OPENED) fsm_Reopen(&cx->physical->link.lcp.fsm); else - bundle_Open(arg->bundle, cx->name, PHYS_ALL, - arg->cmd->args ? 1 : 0); + bundle_Open(arg->bundle, cx->name, PHYS_ALL, 1); } else log_Printf(LogWARN, "open lcp: You must specify a link\n"); } else if (!strcasecmp(arg->argv[arg->argn], "ccp")) { @@ -879,7 +870,7 @@ OpenCommand(struct cmdargs const *arg) if (arg->bundle->ncp.ipcp.fsm.state == ST_OPENED) fsm_Reopen(&arg->bundle->ncp.ipcp.fsm); else - bundle_Open(arg->bundle, NULL, PHYS_ALL, arg->cmd->args ? 1 : 0); + bundle_Open(arg->bundle, NULL, PHYS_ALL, 1); } else return -1; } else diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8 index 5832f05..2b09f56 100644 --- a/usr.sbin/ppp/ppp.8 +++ b/usr.sbin/ppp/ppp.8 @@ -1,4 +1,4 @@ -.\" $Id: ppp.8,v 1.111 1998/06/27 23:48:52 brian Exp $ +.\" $Id: ppp.8,v 1.112 1998/07/29 18:21:17 brian Exp $ .Dd 20 September 1995 .Os FreeBSD .Dt PPP 8 @@ -2374,7 +2374,7 @@ command is used .Pq note the trailing Dq \&! , .Nm will not complain if the route does not already exist. -.It dial[!]|call[!] Op Ar label +.It dial|call Op Ar label When used with no argument, this command is the same as the .Dq open command. When @@ -2428,7 +2428,7 @@ file. If is not given, the .Ar default label is used. -.It open[!] Op lcp|ccp|ipcp +.It open Op lcp|ccp|ipcp This is the opposite of the .Dq close command. Using @@ -2459,11 +2459,6 @@ argument is used, the link will be brought up as normal, but if IPCP is already open, it will be renegotiated and the network interface will be reconfigured. .Pp -If -.Dq open! -is used, any currently running redial timers are ignored and the open -happens immediately. -.Pp It is probably not good practice to re-open the PPP state machines like this as it's possible that the peer will not behave correctly. It diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4 index 5832f05..2b09f56 100644 --- a/usr.sbin/ppp/ppp.8.m4 +++ b/usr.sbin/ppp/ppp.8.m4 @@ -1,4 +1,4 @@ -.\" $Id: ppp.8,v 1.111 1998/06/27 23:48:52 brian Exp $ +.\" $Id: ppp.8,v 1.112 1998/07/29 18:21:17 brian Exp $ .Dd 20 September 1995 .Os FreeBSD .Dt PPP 8 @@ -2374,7 +2374,7 @@ command is used .Pq note the trailing Dq \&! , .Nm will not complain if the route does not already exist. -.It dial[!]|call[!] Op Ar label +.It dial|call Op Ar label When used with no argument, this command is the same as the .Dq open command. When @@ -2428,7 +2428,7 @@ file. If is not given, the .Ar default label is used. -.It open[!] Op lcp|ccp|ipcp +.It open Op lcp|ccp|ipcp This is the opposite of the .Dq close command. Using @@ -2459,11 +2459,6 @@ argument is used, the link will be brought up as normal, but if IPCP is already open, it will be renegotiated and the network interface will be reconfigured. .Pp -If -.Dq open! -is used, any currently running redial timers are ignored and the open -happens immediately. -.Pp It is probably not good practice to re-open the PPP state machines like this as it's possible that the peer will not behave correctly. It |