aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorChris Elston <celston@katalix.com>2012-04-29 17:48:51 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-01 09:30:55 -0400
commit2121c3f571f08bd723f449f2477f1582709f5a2a (patch)
tree0c0c0d80e4a4965322622c50e606d155c8203bc5 /net/l2tp
parentb79585f537ba9631c9b6aafb54a8040c8d515fee (diff)
l2tp: show IPv6 addresses in l2tp debugfs file
If an L2TP tunnel uses IPv6, make sure the l2tp debugfs file shows the IPv6 address correctly. Signed-off-by: Chris Elston <celston@katalix.com> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_debugfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c
index 76130134bfa6..c0d57bad8b79 100644
--- a/net/l2tp/l2tp_debugfs.c
+++ b/net/l2tp/l2tp_debugfs.c
@@ -122,6 +122,14 @@ static void l2tp_dfs_seq_tunnel_show(struct seq_file *m, void *v)
122 seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id); 122 seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id);
123 if (tunnel->sock) { 123 if (tunnel->sock) {
124 struct inet_sock *inet = inet_sk(tunnel->sock); 124 struct inet_sock *inet = inet_sk(tunnel->sock);
125
126#if IS_ENABLED(CONFIG_IPV6)
127 if (tunnel->sock->sk_family == AF_INET6) {
128 struct ipv6_pinfo *np = inet6_sk(tunnel->sock);
129 seq_printf(m, " from %pI6c to %pI6c\n",
130 &np->saddr, &np->daddr);
131 } else
132#endif
125 seq_printf(m, " from %pI4 to %pI4\n", 133 seq_printf(m, " from %pI4 to %pI4\n",
126 &inet->inet_saddr, &inet->inet_daddr); 134 &inet->inet_saddr, &inet->inet_daddr);
127 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) 135 if (tunnel->encap == L2TP_ENCAPTYPE_UDP)