Xin Long 65a5124a71 sctp: support to lookup with ep+paddr in transport rhashtable
Now, when we sendmsg, we translate the ep to laddr by selecting the
first element of the list, and then do a lookup for a transport.

But sctp_hash_cmp() will compare it against asoc addr_list, which may
be a subset of ep addr_list, meaning that this chosen laddr may not be
there, and thus making it impossible to find the transport.

So we fix it by using ep + paddr to lookup transports in hashtable. In
sctp_hash_cmp, if .ep is set, we will check if this ep == asoc->ep,
or we will do the laddr check.

Fixes: d6c0256a60e6 ("sctp: add the rhashtable apis for sctp global transport hashtable")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Reported-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-15 14:41:36 -05:00
..
2016-01-04 10:29:17 -05:00
2015-03-02 16:43:41 -05:00
2015-11-30 14:47:33 -05:00
2015-10-13 17:42:34 +02:00
2016-01-07 14:31:26 -05:00
2015-11-23 14:56:15 -05:00
2016-01-05 22:25:57 -05:00
2015-10-23 03:05:19 -07:00
2015-10-07 04:27:43 -07:00
2016-01-04 21:48:15 -05:00
2016-01-10 22:13:15 -05:00