[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160115.144556.655392601284850128.davem@davemloft.net>
Date: Fri, 15 Jan 2016 14:45:56 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: lucien.xin@...il.com
Cc: netdev@...r.kernel.org, linux-sctp@...r.kernel.org,
marcelo.leitner@...il.com, vyasevich@...il.com,
daniel@...earbox.net
Subject: Re: [PATCH net] sctp: support to lookup with ep+paddr in transport
rhashtable
From: Xin Long <lucien.xin@...il.com>
Date: Thu, 14 Jan 2016 13:49:34 +0800
> 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@...il.com>
> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
> Reported-by: Vlad Yasevich <vyasevich@...il.com>
Applied, thanks.
Powered by blists - more mailing lists