From 552caf0b3e26ae66cb4c77f46a7bea3179d22e60 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Fri, 28 Mar 2014 21:07:01 +0100 Subject: l2tp: don't free packet in l2tp_session_recv() l2tp_conn_read() already has code to free received packets. Let l2tp_session_recv() take advantage of it. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'accel-pppd/ctrl/l2tp/l2tp.c') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index a640478..ae1e804 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -3507,7 +3507,7 @@ static void l2tp_tunnel_create_session(void *data) } static void l2tp_session_recv(struct l2tp_sess_t *sess, - struct l2tp_packet_t *pack) + const struct l2tp_packet_t *pack) { const struct l2tp_attr_t *msg_type = NULL; @@ -3542,8 +3542,6 @@ static void l2tp_session_recv(struct l2tp_sess_t *sess, msg_type->val.uint16); break; } - - l2tp_packet_free(pack); } static int l2tp_conn_read(struct triton_md_handler_t *h) @@ -3715,7 +3713,7 @@ static int l2tp_conn_read(struct triton_md_handler_t *h) continue; } l2tp_session_recv(sess, pack); - continue; + break; case Message_Type_WAN_Error_Notify: l2tp_recv_WEN(conn, pack); break; -- cgit v1.2.3