From 6f1c3cd22e30a22bc7b2f69735d62490f274bb07 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Fri, 15 Mar 2013 21:48:34 +0100 Subject: 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 --- accel-pppd/ctrl/l2tp/l2tp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 958eeb4f..f6a15d62 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; } -- cgit v1.2.3