diff options
author | brian <brian@FreeBSD.org> | 1999-08-22 01:29:53 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-08-22 01:29:53 +0000 |
commit | 6ed835abf4e29a6989d054c374c2ccafbb93f3bf (patch) | |
tree | b20298fe5aa34b2aa07f6f84f0e4b4586b89572d | |
parent | ebc95223ccc81a16307b156a75e68cb5399c5b13 (diff) | |
download | FreeBSD-src-6ed835abf4e29a6989d054c374c2ccafbb93f3bf.zip FreeBSD-src-6ed835abf4e29a6989d054c374c2ccafbb93f3bf.tar.gz |
Allow authkey to be changed independently of the current phase.
-rw-r--r-- | usr.sbin/ppp/command.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 2473fa6..88a9467 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.207 1999/08/17 17:22:44 brian Exp $ + * $Id: command.c,v 1.208 1999/08/19 18:15:49 brian Exp $ * */ #include <sys/param.h> @@ -144,7 +144,7 @@ #define NEG_VJCOMP 53 const char Version[] = "2.23"; -const char VersionDate[] = "$Date: 1999/08/17 17:22:44 $"; +const char VersionDate[] = "$Date: 1999/08/19 18:15:49 $"; static int ShowCommand(struct cmdargs const *); static int TerminalCommand(struct cmdargs const *); @@ -1399,18 +1399,9 @@ SetVariable(struct cmdargs const *arg) switch (param) { case VAR_AUTHKEY: - switch (bundle_Phase(arg->bundle)) { - case PHASE_DEAD: - case PHASE_ESTABLISH: - strncpy(arg->bundle->cfg.auth.key, argp, - sizeof arg->bundle->cfg.auth.key - 1); - arg->bundle->cfg.auth.key[sizeof arg->bundle->cfg.auth.key - 1] = '\0'; - break; - default: - err = "set authkey: Only available at phase DEAD/ESTABLISH\n"; - log_Printf(LogWARN, err); - break; - } + strncpy(arg->bundle->cfg.auth.key, argp, + sizeof arg->bundle->cfg.auth.key - 1); + arg->bundle->cfg.auth.key[sizeof arg->bundle->cfg.auth.key - 1] = '\0'; break; case VAR_AUTHNAME: |