diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-02-11 21:01:51 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-02-12 00:12:47 +0400 |
commit | 4a12ea24f72c833e0294511d2a4a29788b119953 (patch) | |
tree | 78407324ac6c39dace51c0c5febc9a27587d1bbc /accel-pppd | |
parent | 7834f4db6be704c37e043f229bed1142eacc8903 (diff) | |
download | accel-ppp-xebd-4a12ea24f72c833e0294511d2a4a29788b119953.tar.gz accel-ppp-xebd-4a12ea24f72c833e0294511d2a4a29788b119953.zip |
l2tp: Display SCCRQ packets in l2tp_recv_SCCRQ()
The "recv <SCCRQ packet>" message printing should logically belong to
the SCCRQ message reception function. This patch moves this message
from l2tp_tunnel_alloc() to l2tp_recv_SCCRQ() in order to make
l2tp_tunnel_alloc() usable in situations different than SCCRQ
message handling.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 3722915..bdfd9ff 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -705,12 +705,6 @@ static struct l2tp_conn_t *l2tp_tunnel_alloc(struct l2tp_serv_t *serv, conn->tunnel_fd = -1; - if (conf_verbose) { - log_switch(&conn->ctx, NULL); - log_ppp_info2("recv "); - l2tp_packet_print(pack, log_ppp_info2); - } - conn->sessions = NULL; conn->sess_count = 0; @@ -1142,6 +1136,12 @@ static int l2tp_recv_SCCRQ(struct l2tp_serv_t *serv, struct l2tp_packet_t *pack, if (conn == NULL) return -1; + if (conf_verbose) { + log_switch(&conn->ctx, NULL); + log_ppp_info2("recv "); + l2tp_packet_print(pack, log_ppp_info2); + } + conn->peer_tid = assigned_tid->val.uint16; if (l2tp_tunnel_start(conn, (triton_event_func)l2tp_send_SCCRP, conn) < 0) { |