diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-02-06 17:29:19 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-02-06 21:09:07 +0400 |
commit | 3368044035e0fe284099d9e6ab14286462daf0f2 (patch) | |
tree | a4c79b6db24e5e2bfccaf3ce07422e4f7c0232b0 | |
parent | a068ff609288b61f86b37b02f06755f84c5aaca7 (diff) | |
download | accel-ppp-3368044035e0fe284099d9e6ab14286462daf0f2.tar.gz accel-ppp-3368044035e0fe284099d9e6ab14286462daf0f2.zip |
l2tp: No automatic CDN before cancelling sessions
This patch removes the automatic sending of a CDN message when
cancelling creation of new sessions. This is necessary in order
to give the possibility for a tunnel to create (and possibly cancel)
new sessions on its own (e.g. for placing outgoing calls). In such
cases, sending a CDN message would not make sense if the session gets
cancelled before any creation message was sent.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 15887972..13eb695a 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -539,10 +539,8 @@ static int l2tp_tunnel_confirm_session(struct l2tp_sess_t *sess) return 0; } -static int l2tp_tunnel_cancel_session(struct l2tp_sess_t *sess, - uint16_t res, uint16_t err) +static int l2tp_tunnel_cancel_session(struct l2tp_sess_t *sess) { - l2tp_send_CDN(sess, res, err); tdelete(sess, &sess->paren_conn->sessions, sess_cmp); if (sess->ctrl.calling_station_id) _free(sess->ctrl.calling_station_id); @@ -1217,7 +1215,8 @@ static int l2tp_recv_ICRQ(struct l2tp_conn_t *conn, struct l2tp_packet_t *pack) return 0; out_reject: - l2tp_tunnel_cancel_session(sess, res, err); + l2tp_send_CDN(sess, res, err); + l2tp_tunnel_cancel_session(sess); return -1; } |