summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-03-15 21:48:34 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-03-16 08:34:46 +0400
commit6f1c3cd22e30a22bc7b2f69735d62490f274bb07 (patch)
tree8531256480f846fdc4cc836db29af15692eb9746 /accel-pppd
parentb95734f0b939697e504747c4abb69d599fe45ad3 (diff)
downloadaccel-ppp-6f1c3cd22e30a22bc7b2f69735d62490f274bb07.tar.gz
accel-ppp-6f1c3cd22e30a22bc7b2f69735d62490f274bb07.zip
l2tp: Don't close tunnel upon error on HELLO
If a HELLO message can't be acknowledged just log an error as tunnel doesn't need to get closed. If too many HELLO messages aren't acknowledged, the peer will close the tunnel itself. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index 958eeb4..f6a15d6 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -1450,12 +1450,12 @@ static void l2tp_send_HELLO(struct triton_timer_t *t)
if (!pack) {
log_tunnel(log_error, conn, "impossible to send HELLO:"
" packet allocation failed\n");
- l2tp_tunnel_free(conn);
return;
}
if (l2tp_tunnel_send(conn, pack) < 0)
- l2tp_tunnel_free(conn);
+ log_tunnel(log_error, conn, "impossible to send HELLO:"
+ " sending packet failed\n");
}
static void l2tp_send_SCCRQ(void *peer_addr)
@@ -2282,7 +2282,8 @@ static int l2tp_recv_HELLO(struct l2tp_conn_t *conn,
const struct l2tp_packet_t *pack)
{
if (l2tp_send_ZLB(conn) < 0) {
- log_tunnel(log_error, conn, "acknowledging HELLO failed\n");
+ log_tunnel(log_error, conn, "impossible to handle HELLO:"
+ " sending ZLB failed\n");
return -1;
}