diff options
Diffstat (limited to 'net/l2tp/l2tp_debugfs.c')
| -rw-r--r-- | net/l2tp/l2tp_debugfs.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c index 76130134bfa6..c3813bc84552 100644 --- a/net/l2tp/l2tp_debugfs.c +++ b/net/l2tp/l2tp_debugfs.c | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 13 | |||
| 12 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 13 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
| 14 | #include <linux/socket.h> | 16 | #include <linux/socket.h> |
| @@ -122,6 +124,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); | 124 | seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id); |
| 123 | if (tunnel->sock) { | 125 | if (tunnel->sock) { |
| 124 | struct inet_sock *inet = inet_sk(tunnel->sock); | 126 | struct inet_sock *inet = inet_sk(tunnel->sock); |
| 127 | |||
| 128 | #if IS_ENABLED(CONFIG_IPV6) | ||
| 129 | if (tunnel->sock->sk_family == AF_INET6) { | ||
| 130 | struct ipv6_pinfo *np = inet6_sk(tunnel->sock); | ||
| 131 | seq_printf(m, " from %pI6c to %pI6c\n", | ||
| 132 | &np->saddr, &np->daddr); | ||
| 133 | } else | ||
| 134 | #endif | ||
| 125 | seq_printf(m, " from %pI4 to %pI4\n", | 135 | seq_printf(m, " from %pI4 to %pI4\n", |
| 126 | &inet->inet_saddr, &inet->inet_daddr); | 136 | &inet->inet_saddr, &inet->inet_daddr); |
| 127 | if (tunnel->encap == L2TP_ENCAPTYPE_UDP) | 137 | if (tunnel->encap == L2TP_ENCAPTYPE_UDP) |
| @@ -317,11 +327,11 @@ static int __init l2tp_debugfs_init(void) | |||
| 317 | if (tunnels == NULL) | 327 | if (tunnels == NULL) |
| 318 | rc = -EIO; | 328 | rc = -EIO; |
| 319 | 329 | ||
| 320 | printk(KERN_INFO "L2TP debugfs support\n"); | 330 | pr_info("L2TP debugfs support\n"); |
| 321 | 331 | ||
| 322 | out: | 332 | out: |
| 323 | if (rc) | 333 | if (rc) |
| 324 | printk(KERN_WARNING "l2tp debugfs: unable to init\n"); | 334 | pr_warn("unable to init\n"); |
| 325 | 335 | ||
| 326 | return rc; | 336 | return rc; |
| 327 | } | 337 | } |
