summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Chapman <jchapman@katalix.com>2010-04-02 06:18:44 +0000
committerDavid S. Miller <davem@davemloft.net>2010-04-03 14:56:03 -0700
commit9345471bca96d00d4196b3dcc4a5625f1bfae247 (patch)
treeea35c7f3bed73c5bdba0fbbdac4566eafcf23edd
parent63f96072f9ba430aa348bc987c3d5a4f48bae301 (diff)
downloadlinux-3.10-9345471bca96d00d4196b3dcc4a5625f1bfae247.tar.gz
linux-3.10-9345471bca96d00d4196b3dcc4a5625f1bfae247.tar.bz2
linux-3.10-9345471bca96d00d4196b3dcc4a5625f1bfae247.zip
l2tp: Add ppp device name to L2TP ppp session data
When dumping L2TP PPP sessions using /proc/net/pppol2tp, get the assigned PPP device name from PPP using ppp_dev_name(). Signed-off-by: James Chapman <jchapman@katalix.com> Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/l2tp/l2tp_ppp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index baac072761a..3ad290dd830 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1465,6 +1465,7 @@ static void pppol2tp_seq_session_show(struct seq_file *m, void *v)
struct l2tp_session *session = v;
struct l2tp_tunnel *tunnel = session->tunnel;
struct pppol2tp_session *ps = l2tp_session_priv(session);
+ struct pppox_sock *po = pppox_sk(ps->sock);
u32 ip = 0;
u16 port = 0;
@@ -1499,6 +1500,9 @@ static void pppol2tp_seq_session_show(struct seq_file *m, void *v)
(unsigned long long)session->stats.rx_packets,
(unsigned long long)session->stats.rx_bytes,
(unsigned long long)session->stats.rx_errors);
+
+ if (po)
+ seq_printf(m, " interface %s\n", ppp_dev_name(&po->chan));
}
static int pppol2tp_seq_show(struct seq_file *m, void *v)