aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/bundle.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-03-13 21:07:14 +0000
committerBrian Somers <brian@FreeBSD.org>1998-03-13 21:07:14 +0000
commita611cad61ddd580230399f0ef61f637a208345fb (patch)
tree70bec5b6d42195bdd0df5964a7552cdc066f0473 /usr.sbin/ppp/bundle.c
parent2c995c533218e8be2ba869a3ce744e70c37bc308 (diff)
downloadsrc-a611cad61ddd580230399f0ef61f637a208345fb.tar.gz
src-a611cad61ddd580230399f0ef61f637a208345fb.zip
o Don't immediately reply to the first LQR thinking
it's a duplicate ('cos it compares with our initial values). o Move the LCP into struct datalink.
Notes
Notes: svn path=/cvs2svn/branches/MP/; revision=34556
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r--usr.sbin/ppp/bundle.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 79efbdcb5d4a..104415860a9b 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bundle.c,v 1.1.2.22 1998/03/13 00:44:32 brian Exp $
+ * $Id: bundle.c,v 1.1.2.23 1998/03/13 00:44:38 brian Exp $
*/
#include <sys/param.h>
@@ -238,10 +238,7 @@ bundle_LayerFinish(void *v, struct fsm *fp)
struct bundle *bundle = (struct bundle *)v;
- if (fp->proto == PROTO_LCP) {
- FsmDown(&IpcpInfo.fsm); /* You've lost your underlings */
- FsmClose(&IpcpInfo.fsm); /* ST_INITIAL please */
- } else if (fp == &IpcpInfo.fsm) {
+ if (fp->proto == PROTO_IPCP) {
struct datalink *dl;
bundle_NewPhase(bundle, PHASE_TERMINATE);
@@ -249,6 +246,10 @@ bundle_LayerFinish(void *v, struct fsm *fp)
for (dl = bundle->links; dl; dl = dl->next)
datalink_Close(dl, 1);
}
+
+ /* when either the LCP or IPCP is down, drop IPCP */
+ FsmDown(&IpcpInfo.fsm);
+ FsmClose(&IpcpInfo.fsm); /* ST_INITIAL please */
}
int
@@ -640,6 +641,8 @@ bundle_Open(struct bundle *bundle, const char *name)
if (name != NULL)
break;
}
+ if (bundle->phase == PHASE_DEAD)
+ bundle_NewPhase(bundle, PHASE_ESTABLISH);
}
struct datalink *
@@ -676,14 +679,10 @@ bundle2ccp(struct bundle *bundle, const char *name)
struct lcp *
bundle2lcp(struct bundle *bundle, const char *name)
{
-#ifdef realcode
struct datalink *dl = bundle2datalink(bundle, name);
if (dl)
return &dl->lcp;
return NULL;
-#else
- return &LcpInfo;
-#endif
}
struct authinfo *