diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2014-04-08 22:53:22 +0200 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-04-11 06:47:26 +0400 |
commit | 3448534c7fc579793840af199ae97f8184e99aa1 (patch) | |
tree | 9806d9236f8e8b667c55e9716bc72d6e41f8c8d9 /accel-pppd/ctrl | |
parent | f2c1387d79966e950c534be9f020ccbbc75f4aa3 (diff) | |
download | accel-ppp-3448534c7fc579793840af199ae97f8184e99aa1.tar.gz accel-ppp-3448534c7fc579793840af199ae97f8184e99aa1.zip |
l2tp: delete tunnel in l2tp_recv_StopCCN()
Now that l2tp_tunnel_free() can be called directly inside the main
reception loop, let l2tp_recv_StopCCN() delete the tunnel itself.
This avoids special handling in l2tp_conn_read().
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 8addf16..e6ec075 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -2746,6 +2746,8 @@ static int l2tp_recv_StopCCN(struct l2tp_conn_t *conn, if (l2tp_send_ZLB(conn) < 0) log_tunnel(log_warn, conn, "acknowledging StopCCN failed\n"); + l2tp_tunnel_free(conn); + return -1; } @@ -3732,7 +3734,7 @@ static int l2tp_conn_read(struct triton_md_handler_t *h) break; case Message_Type_Stop_Ctrl_Conn_Notify: l2tp_recv_StopCCN(conn, pack); - goto drop; + break; case Message_Type_Hello: l2tp_recv_HELLO(conn, pack); break; |