[1/3] gtp: add some debug instrumentation
diff mbox

Message ID 1447758380-22202-2-git-send-email-aschultz@tpip.net
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Andreas Schultz Nov. 17, 2015, 11:06 a.m. UTC
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
---
 gtp.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Pablo Neira Ayuso Nov. 17, 2015, 12:35 p.m. UTC | #1
Applied.

Patch
diff mbox

diff --git a/gtp.c b/gtp.c
index 8782fea..cbe2da1 100644
--- a/gtp.c
+++ b/gtp.c
@@ -330,6 +330,8 @@  static int gtp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
 	if (!gti)
 		goto user;
 
+	netdev_dbg(gti->dev, "encap_recv %p\n", sk);
+
 	switch (udp_sk(sk)->encap_type) {
 	case UDP_ENCAP_GTP0:
 		netdev_dbg(gti->dev, "received GTP0 packet\n");
@@ -893,6 +895,8 @@  static int gtp_encap_enable(struct net_device *dev, struct gtp_instance *gti,
 	struct socket *sock0, *sock1u;
 	struct sock *sk;
 
+	netdev_dbg(dev, "enable gtp on %d, %d\n", fd_gtp0, fd_gtp1);
+
 	sock0 = sockfd_lookup(fd_gtp0, &err);
 	if (sock0 == NULL) {
 		netdev_dbg(dev, "socket fd=%d not found (gtp0)\n", fd_gtp0);
@@ -918,6 +922,8 @@  static int gtp_encap_enable(struct net_device *dev, struct gtp_instance *gti,
 		goto err2;
 	}
 
+	netdev_dbg(dev, "enable gtp on %p, %p\n", sock0, sock1u);
+
 	gti->sock0 = sock0;
 	gti->sock1u = sock1u;