summaryrefslogtreecommitdiff
path: root/accel-pptpd
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-12-20 12:02:22 +0300
committerDmitry Kozlov <xeb@mail.ru>2010-12-20 12:02:22 +0300
commite4e7cdf5eba8d68ffe620056517d15fef21074cf (patch)
tree4f5cce2d644bab5d31c45f422fdcd776550e4505 /accel-pptpd
parentceae1bd99487b1fa9e46ebe08def3b3727867889 (diff)
downloadaccel-ppp-e4e7cdf5eba8d68ffe620056517d15fef21074cf.tar.gz
accel-ppp-e4e7cdf5eba8d68ffe620056517d15fef21074cf.zip
ppp: start echo again after lcp went down
Diffstat (limited to 'accel-pptpd')
-rw-r--r--accel-pptpd/extra/pppd_compat.c8
-rw-r--r--accel-pptpd/ppp/ppp_lcp.c5
2 files changed, 6 insertions, 7 deletions
diff --git a/accel-pptpd/extra/pppd_compat.c b/accel-pptpd/extra/pppd_compat.c
index 07ff075..3a28c93 100644
--- a/accel-pptpd/extra/pppd_compat.c
+++ b/accel-pptpd/extra/pppd_compat.c
@@ -126,8 +126,8 @@ static void ev_ppp_pre_up(struct ppp_t *ppp)
pid_t pid;
char *argv[8];
char *env[2];
- char ipaddr[16];
- char peer_ipaddr[16];
+ char ipaddr[17];
+ char peer_ipaddr[17];
char peername[64];
struct pppd_compat_pd_t *pd = find_pd(ppp);
@@ -318,8 +318,8 @@ static void ev_radius_coa(struct ev_radius_t *ev)
pid_t pid;
char *argv[8];
char *env[2];
- char ipaddr[16];
- char peer_ipaddr[16];
+ char ipaddr[17];
+ char peer_ipaddr[17];
char peername[64];
struct pppd_compat_pd_t *pd = find_pd(ev->ppp);
diff --git a/accel-pptpd/ppp/ppp_lcp.c b/accel-pptpd/ppp/ppp_lcp.c
index 334f6c8..bf5ab7a 100644
--- a/accel-pptpd/ppp/ppp_lcp.c
+++ b/accel-pptpd/ppp/ppp_lcp.c
@@ -161,9 +161,8 @@ static void lcp_layer_up(struct ppp_fsm_t *fsm)
if (!lcp->started) {
lcp->started = 1;
ppp_layer_started(lcp->ppp, &lcp->ld);
-
- start_echo(lcp);
}
+ start_echo(lcp);
}
static void lcp_layer_down(struct ppp_fsm_t *fsm)
@@ -629,7 +628,7 @@ static void start_echo(struct ppp_lcp_t *lcp)
lcp->echo_timer.period = lcp->echo_interval * 1000;
lcp->echo_timer.expire = send_echo_request;
- if (lcp->echo_timer.period)
+ if (lcp->echo_timer.period && !lcp->echo_timer.tpd)
triton_timer_add(lcp->ppp->ctrl->ctx, &lcp->echo_timer, 0);
}
static void stop_echo(struct ppp_lcp_t *lcp)