diff options
author | Xin Long <lucien.xin@gmail.com> | 2016-01-14 05:49:34 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-15 19:41:36 (GMT) |
commit | 65a5124a71e85c35fa8d047a471950325855dccf (patch) | |
tree | f6183f8289a82e6493b591f2cfb7912d1a04c25e /drivers/net/ethernet/cadence | |
parent | 628a96e7d3b684baf5584462de32345e997d7dbe (diff) | |
download | linux-65a5124a71e85c35fa8d047a471950325855dccf.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/cadence')
0 files changed, 0 insertions, 0 deletions