summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2014-03-28 21:07:01 +0100
committerDmitry Kozlov <xeb@mail.ru>2014-04-01 06:48:02 +0400
commit552caf0b3e26ae66cb4c77f46a7bea3179d22e60 (patch)
tree6059587c74941ed90071f79700b50ffdde8f118e /accel-pppd/ctrl/l2tp
parent8cea2461960a56205b839994b3db0c9c8f09f856 (diff)
downloadaccel-ppp-552caf0b3e26ae66cb4c77f46a7bea3179d22e60.tar.gz
accel-ppp-552caf0b3e26ae66cb4c77f46a7bea3179d22e60.zip
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 <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index a6404781..ae1e8045 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;