Commit 9345471b authored by James Chapman's avatar James Chapman Committed by David S. Miller

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: default avatarJames Chapman <jchapman@katalix.com>
Reviewed-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63f96072
...@@ -1465,6 +1465,7 @@ static void pppol2tp_seq_session_show(struct seq_file *m, void *v) ...@@ -1465,6 +1465,7 @@ static void pppol2tp_seq_session_show(struct seq_file *m, void *v)
struct l2tp_session *session = v; struct l2tp_session *session = v;
struct l2tp_tunnel *tunnel = session->tunnel; struct l2tp_tunnel *tunnel = session->tunnel;
struct pppol2tp_session *ps = l2tp_session_priv(session); struct pppol2tp_session *ps = l2tp_session_priv(session);
struct pppox_sock *po = pppox_sk(ps->sock);
u32 ip = 0; u32 ip = 0;
u16 port = 0; u16 port = 0;
...@@ -1499,6 +1500,9 @@ static void pppol2tp_seq_session_show(struct seq_file *m, void *v) ...@@ -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_packets,
(unsigned long long)session->stats.rx_bytes, (unsigned long long)session->stats.rx_bytes,
(unsigned long long)session->stats.rx_errors); (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) static int pppol2tp_seq_show(struct seq_file *m, void *v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment