[SCTP]: sctp_endpoint_lookup_assoc() switched to net-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index c543f32..5ffb1af 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -257,16 +257,14 @@
int rport;
struct sctp_association *asoc;
struct list_head *pos;
- union sctp_addr tmp;
- flip_to_n(&tmp, paddr);
- rport = paddr->v4.sin_port;
+ rport = ntohs(paddr->v4.sin_port);
list_for_each(pos, &ep->asocs) {
asoc = list_entry(pos, struct sctp_association, asocs);
if (rport == asoc->peer.port) {
sctp_read_lock(&asoc->base.addr_lock);
- *transport = sctp_assoc_lookup_paddr(asoc, &tmp);
+ *transport = sctp_assoc_lookup_paddr(asoc, paddr);
sctp_read_unlock(&asoc->base.addr_lock);
if (*transport)
@@ -348,8 +346,10 @@
* COOKIE-ECHO chunk.
*/
if (NULL == chunk->asoc) {
+ union sctp_addr tmp;
+ flip_to_n(&tmp, sctp_source(chunk));
asoc = sctp_endpoint_lookup_assoc(ep,
- sctp_source(chunk),
+ &tmp,
&transport);
chunk->asoc = asoc;
chunk->transport = transport;