linux/net
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
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: Fix list removal of batadv_hardif_neigh_node 2016-01-13 19:28:27 +08:00
bluetooth
bridge bridge: Reflect MDB entries to hardware 2016-01-10 16:50:21 -05:00
caif
can
ceph
core net: preserve IP control block during GSO segmentation 2016-01-15 14:35:24 -05:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ipv4 net: preserve IP control block during GSO segmentation 2016-01-15 14:35:24 -05:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
ipx
irda
iucv
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls
netfilter
netlabel
netlink genetlink: Fix off-by-one in genl_allocate_reserve_groups() 2016-01-13 10:28:06 -05:00
netrom
nfc
openvswitch net: preserve IP control block during GSO segmentation 2016-01-15 14:35:24 -05:00
packet
phonet phonet: properly unshare skbs in phonet_rcv() 2016-01-12 12:05:38 -05:00
rds
rfkill
rose
rxrpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-01-12 18:57:02 -08:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
sctp sctp: support to lookup with ep+paddr in transport rhashtable 2016-01-15 14:41:36 -05:00
sunrpc
switchdev switchdev: Adding MDB entry offload 2016-01-10 16:50:20 -05:00
tipc
unix Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
vmw_vsock
wimax
wireless
x25
xfrm net: preserve IP control block during GSO segmentation 2016-01-15 14:35:24 -05:00
compat.c
Kconfig net, sched: add clsact qdisc 2016-01-10 22:13:15 -05:00
Makefile
socket.c net: add scheduling point in recvmmsg/sendmmsg 2016-01-10 22:56:29 -05:00
sysctl_net.c