mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 21:18:59 +00:00
Always dial immediately on `open'',
dial'' and
`call''.
We don't need a ``!''.
This commit is contained in:
parent
e35d857d64
commit
c31ac0b396
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37993
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user