From 0293d2c800f6e22536b82c0c0c2a5f73e9c5d01a Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Fri, 28 Mar 2014 21:06:13 +0100 Subject: l2tp: modify control channel name string Use a syntax closer to the one used by log_session() in order to ease grep searching in log files. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index a4256276..255dd887 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -1526,8 +1526,11 @@ static int l2tp_session_connect(struct l2tp_sess_t *sess) u_inet_ntoa(conn->peer_addr.sin_addr.s_addr, addr); peer_port = ntohs(conn->peer_addr.sin_port); - if (_asprintf(&sess->ppp.ses.chan_name, "%s:%i session %i", - addr, peer_port, sess->peer_sid) < 0) { + if (_asprintf(&sess->ppp.ses.chan_name, + "%s:%hu session %hu-%hu, %hu-%hu", + addr, peer_port, + sess->paren_conn->tid, sess->paren_conn->peer_tid, + sess->sid, sess->peer_sid) < 0) { log_session(log_error, sess, "impossible to connect session:" " setting session's channel name failed\n"); goto out_err; -- cgit v1.2.3