Force IPCP back to initial in bundle_Close().

Add a few un-necessary includes to make us build under
2.2.5.  These'll go when the code is cleaned up at the
end.
This commit is contained in:
Brian Somers 1998-03-02 17:25:30 +00:00
parent e2ebb036fd
commit d2fd8d772f
4 changed files with 15 additions and 7 deletions

View File

@ -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.17 1998/02/27 01:22:16 brian Exp $
* $Id: bundle.c,v 1.1.2.18 1998/03/01 01:07:39 brian Exp $
*/
#include <sys/param.h>
@ -174,7 +174,7 @@ bundle_LayerStart(void *v, struct fsm *fp)
/* The given FSM is about to start up ! */
struct bundle *bundle = (struct bundle *)v;
if (fp == &LcpInfo.fsm)
if (fp->proto == PROTO_LCP && bundle->phase == PHASE_DEAD)
bundle_NewPhase(bundle, link2physical(fp->link), PHASE_ESTABLISH);
}
@ -226,7 +226,7 @@ bundle_LayerFinish(void *v, struct fsm *fp)
struct bundle *bundle = (struct bundle *)v;
if (fp == &LcpInfo.fsm) {
if (fp->proto == PROTO_LCP) {
FsmDown(&IpcpInfo.fsm); /* You've lost your underlings */
FsmClose(&IpcpInfo.fsm); /* ST_INITIAL please */
} else if (fp == &IpcpInfo.fsm) {
@ -268,9 +268,14 @@ bundle_Close(struct bundle *bundle, const char *name, int staydown)
if (staydown)
for (dl = bundle->links; dl; dl = dl->next)
datalink_StayDown(dl);
} else
} else {
if (IpcpInfo.fsm.state > ST_INITIAL) {
FsmClose(&IpcpInfo.fsm);
FsmDown(&IpcpInfo.fsm);
}
for (dl = bundle->links; dl; dl = dl->next)
datalink_Close(dl, staydown);
}
}
/*

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ip.c,v 1.38.2.7 1998/02/16 00:00:11 brian Exp $
* $Id: ip.c,v 1.38.2.8 1998/02/23 00:38:32 brian Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@ -27,6 +27,7 @@
#include <sys/time.h>
#include <sys/socket.h>
#include <net/if.h>
#include <sys/select.h>
#include <net/if_tun.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: lcp.c,v 1.55.2.22 1998/02/27 21:46:26 brian Exp $
* $Id: lcp.c,v 1.55.2.23 1998/03/01 01:07:45 brian Exp $
*
* TODO:
* o Limit data field length by MRU
@ -26,6 +26,7 @@
#include <sys/time.h>
#include <sys/socket.h>
#include <net/if.h>
#include <sys/select.h>
#include <net/if_tun.h>
#include <netinet/in.h>
#include <arpa/inet.h>

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: tun.c,v 1.6.4.2 1998/02/18 19:35:59 brian Exp $
* $Id: tun.c,v 1.6.4.3 1998/02/27 01:22:39 brian Exp $
*/
#include <sys/param.h>
@ -31,6 +31,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <sys/select.h>
#include <net/if_tun.h>
#include <stdio.h>