summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-07-04 22:03:56 +0000
committerbrian <brian@FreeBSD.org>1998-07-04 22:03:56 +0000
commit17cce659be653a791e20de5fd2055d7fcdbec86a (patch)
tree628f652768a8c9a6a6c35135db3681decb4dd570 /usr.sbin
parent4363221ba26e1c75ed511a0f0865f846907e9872 (diff)
downloadFreeBSD-src-17cce659be653a791e20de5fd2055d7fcdbec86a.zip
FreeBSD-src-17cce659be653a791e20de5fd2055d7fcdbec86a.tar.gz
Don't require context when there's only one link
for ``open lcp''
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/command.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 0c966b5..89ad580 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.152 1998/06/27 23:48:42 brian Exp $
+ * $Id: command.c,v 1.153 1998/07/04 10:24:49 brian Exp $
*
*/
#include <sys/types.h>
@@ -122,7 +122,7 @@
#define NEG_DNS 50
const char Version[] = "2.0";
-const char VersionDate[] = "$Date: 1998/06/27 23:48:42 $";
+const char VersionDate[] = "$Date: 1998/07/04 10:24:49 $";
static int ShowCommand(struct cmdargs const *);
static int TerminalCommand(struct cmdargs const *);
@@ -837,11 +837,13 @@ OpenCommand(struct cmdargs const *arg)
bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL);
else if (arg->argc == arg->argn + 1) {
if (!strcasecmp(arg->argv[arg->argn], "lcp")) {
- if (arg->cx) {
- if (arg->cx->physical->link.lcp.fsm.state == ST_OPENED)
- fsm_Reopen(&arg->cx->physical->link.lcp.fsm);
+ struct datalink *cx = arg->cx ?
+ arg->cx : bundle2datalink(arg->bundle, NULL);
+ if (cx) {
+ if (cx->physical->link.lcp.fsm.state == ST_OPENED)
+ fsm_Reopen(&cx->physical->link.lcp.fsm);
else
- bundle_Open(arg->bundle, arg->cx->name, PHYS_ALL);
+ bundle_Open(arg->bundle, cx->name, PHYS_ALL);
} else
log_Printf(LogWARN, "open lcp: You must specify a link\n");
} else if (!strcasecmp(arg->argv[arg->argn], "ccp")) {
OpenPOWER on IntegriCloud