gtp: add some debug instrumentation
Signed-off-by: Andreas Schultz <aschultz@tpip.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
976dcfc9f1
commit
b7b46cd757
6
gtp.c
6
gtp.c
|
@ -330,6 +330,8 @@ static int gtp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||||
if (!gti)
|
if (!gti)
|
||||||
goto user;
|
goto user;
|
||||||
|
|
||||||
|
netdev_dbg(gti->dev, "encap_recv %p\n", sk);
|
||||||
|
|
||||||
switch (udp_sk(sk)->encap_type) {
|
switch (udp_sk(sk)->encap_type) {
|
||||||
case UDP_ENCAP_GTP0:
|
case UDP_ENCAP_GTP0:
|
||||||
netdev_dbg(gti->dev, "received GTP0 packet\n");
|
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 socket *sock0, *sock1u;
|
||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
|
|
||||||
|
netdev_dbg(dev, "enable gtp on %d, %d\n", fd_gtp0, fd_gtp1);
|
||||||
|
|
||||||
sock0 = sockfd_lookup(fd_gtp0, &err);
|
sock0 = sockfd_lookup(fd_gtp0, &err);
|
||||||
if (sock0 == NULL) {
|
if (sock0 == NULL) {
|
||||||
netdev_dbg(dev, "socket fd=%d not found (gtp0)\n", fd_gtp0);
|
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;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
netdev_dbg(dev, "enable gtp on %p, %p\n", sock0, sock1u);
|
||||||
|
|
||||||
gti->sock0 = sock0;
|
gti->sock0 = sock0;
|
||||||
gti->sock1u = sock1u;
|
gti->sock1u = sock1u;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue