linux/net/sctp
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: d6c0256a60 ("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
..
Kconfig
Makefile net: sctp: Inline the functions from command.c 2014-07-08 14:38:48 -07:00
associola.c sctp: apply rhashtable api to send/recv path 2016-01-05 12:24:01 -05:00
auth.c sctp: translate host order to network order when setting a hmacid 2015-11-15 18:27:27 -05:00
bind_addr.c
chunk.c switch sctp_user_addto_chunk() and sctp_datamsg_from_user() to passing iov_iter 2014-11-24 05:16:40 -05:00
debug.c
endpointola.c sctp: remove the local_bh_disable/enable in sctp_endpoint_lookup_assoc 2016-01-05 12:24:02 -05:00
input.c sctp: support to lookup with ep+paddr in transport rhashtable 2016-01-15 14:41:36 -05:00
inqueue.c net: sctp: fix remote memory pressure from excessive queueing 2014-10-14 12:46:22 -04:00
ipv6.c ipv6: sctp: clone options to avoid use after free 2015-12-11 20:18:40 -05:00
objcnt.c
output.c sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC 2015-12-15 16:49:58 -05:00
outqueue.c sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING 2015-12-06 22:31:51 -05:00
primitive.c
probe.c
proc.c sctp: apply rhashtable api to sctp procfs 2016-01-05 12:24:01 -05:00
protocol.c sctp: drop the old assoc hashtable of sctp 2016-01-05 12:24:01 -05:00
sm_make_chunk.c sctp: use the same clock as if sock source timestamps were on 2015-12-05 22:23:22 -05:00
sm_sideeffect.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
sm_statefuns.c sctp: fix use-after-free in pr_debug statement 2016-01-11 17:13:01 -05:00
sm_statetable.c
socket.c sctp: drop the old assoc hashtable of sctp 2016-01-05 12:24:01 -05:00
ssnmap.c
sysctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
transport.c remove abs64() 2015-11-09 15:11:24 -08:00
tsnmap.c
ulpevent.c sctp: Fixup v4mapped behaviour to comply with Sock API 2014-07-31 21:49:06 -07:00
ulpqueue.c net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00