diff options
author | Marcelo Ricardo Leitner | 2016-12-28 09:51:56 -0200 |
---|---|---|
committer | David S. Miller | 2016-12-28 14:26:17 -0500 |
commit | b77b7565a6d11611c3f179941d2b95c2d72939dc (patch) | |
tree | f104e2c7745e3a5034f85541ed791ba6587fe304 /net/sctp | |
parent | 3ea35d3406d31a7389c2a299e28168c52040843a (diff) |
sctp: add pr_debug for tracking asocs not found
This pr_debug may help identify why the system is generating some
Aborts. It's not something a sysadmin would be expected to use.
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/input.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 458e506ef84b..704ad19c1565 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -1229,13 +1229,26 @@ static struct sctp_association *__sctp_rcv_lookup(struct net *net, struct sctp_association *asoc; asoc = __sctp_lookup_association(net, laddr, paddr, transportp); + if (asoc) + goto out; /* Further lookup for INIT/INIT-ACK packets. * SCTP Implementors Guide, 2.18 Handling of address * parameters within the INIT or INIT-ACK. */ - if (!asoc) - asoc = __sctp_rcv_lookup_harder(net, skb, laddr, transportp); + asoc = __sctp_rcv_lookup_harder(net, skb, laddr, transportp); + if (asoc) + goto out; + if (paddr->sa.sa_family == AF_INET) + pr_debug("sctp: asoc not found for src:%pI4:%d dst:%pI4:%d\n", + &laddr->v4.sin_addr, ntohs(laddr->v4.sin_port), + &paddr->v4.sin_addr, ntohs(paddr->v4.sin_port)); + else + pr_debug("sctp: asoc not found for src:%pI6:%d dst:%pI6:%d\n", + &laddr->v6.sin6_addr, ntohs(laddr->v6.sin6_port), + &paddr->v6.sin6_addr, ntohs(paddr->v6.sin6_port)); + +out: return asoc; } |