summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/mp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-10-24 01:08:45 +0000
committerbrian <brian@FreeBSD.org>1998-10-24 01:08:45 +0000
commitcb6bccf1dc60c955024134903445d05945bc35ed (patch)
tree156da8f3c1b24a827c03c07dea9db235785f08ae /usr.sbin/ppp/mp.c
parent2dd69edc856356b5cc916927ac51649c15ff753f (diff)
downloadFreeBSD-src-cb6bccf1dc60c955024134903445d05945bc35ed.zip
FreeBSD-src-cb6bccf1dc60c955024134903445d05945bc35ed.tar.gz
Loosen our restrictions on setting enddisc, mrru,
shortseq, authname and authkey. o Auth{name,key} may additionally be set in PHASE_ESTABLISH. o The others may be set in PHASE_ESTABLISH as long as no links have yet reached DATALINK_LCP.
Diffstat (limited to 'usr.sbin/ppp/mp.c')
-rw-r--r--usr.sbin/ppp/mp.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c
index e9d38ba..201ce66 100644
--- a/usr.sbin/ppp/mp.c
+++ b/usr.sbin/ppp/mp.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp.c,v 1.15 1998/08/26 17:39:37 brian Exp $
+ * $Id: mp.c,v 1.16 1998/09/04 18:25:59 brian Exp $
*/
#include <sys/types.h>
@@ -774,9 +774,20 @@ mp_SetEnddisc(struct cmdargs const *arg)
struct mp *mp = &arg->bundle->ncp.mp;
struct in_addr addr;
- if (bundle_Phase(arg->bundle) != PHASE_DEAD) {
- log_Printf(LogWARN, "set enddisc: Only available at phase DEAD\n");
- return 1;
+ switch (bundle_Phase(arg->bundle)) {
+ case PHASE_DEAD:
+ break;
+ case PHASE_ESTABLISH:
+ /* Make sure none of our links are DATALINK_LCP or greater */
+ if (bundle_HighestState(arg->bundle) >= DATALINK_LCP) {
+ log_Printf(LogWARN, "enddisc: Only changable before"
+ " LCP negotiations\n");
+ return 1;
+ }
+ break;
+ default:
+ log_Printf(LogWARN, "enddisc: Only changable at phase DEAD/ESTABLISH\n");
+ return 1;
}
if (arg->argc == arg->argn) {
OpenPOWER on IntegriCloud