-/* $OpenBSD: lcp.c,v 1.12 2015/06/25 02:25:33 yasuoka Exp $ */
+/* $OpenBSD: lcp.c,v 1.13 2015/06/25 02:32:48 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: lcp.c,v 1.12 2015/06/25 02:25:33 yasuoka Exp $ */
+/* $Id: lcp.c,v 1.13 2015/06/25 02:32:48 yasuoka Exp $ */
/**@file
* This file provides LCP related functions.
*<pre>
static int lcp_proxy_recv_ci(fsm *, u_char *, int);
static int lcp_proxy_sent_ci(fsm *, u_char *, int);
static void lcp_load_authconfig(fsm *f);
-static void lcp_dialin_proxy_open(void *ctx);
static struct fsm_callbacks lcp_callbacks = {
lcp_resetci, /* Reset our Configuration Information */
{
fsm_lowerup(&_this->fsm);
fsm_open(&_this->fsm);
+
+ if (_this->dialin_proxy != 0 &&
+ _this->dialin_proxy_lcp_renegotiation == 0) {
+ _this->fsm.state = OPENED;
+ lcp_open(&_this->fsm);
+ }
}
/**
(_this->dialin_proxy_lcp_renegotiation != 0)? "yes" : "no");
- if (_this->dialin_proxy_lcp_renegotiation == 0) {
- /* call lcp_open by another event handler */
- TIMEOUT(lcp_dialin_proxy_open, _this, 0);
- } else
+ if (_this->dialin_proxy_lcp_renegotiation == 0)
+ _this->fsm.flags |= OPT_SILENT; /* It's ready to be "Opened" */
+ else
_this->fsm.flags &= ~OPT_SILENT;
return 0;
return 1;
}
-static void
-lcp_dialin_proxy_open(void *ctx)
-{
- lcp *_this;
-
- _this = ctx;
- _this->fsm.state = OPENED;
- lcp_open(&_this->fsm);
-}
-
/*
* This function copies from lcp_ackci. It only differs as follows:
* - Do not recv_reass++.