aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/endpointola.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:11:33 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:49 -0500
commitcd4ff034e3572679f7ff8f126469b3addd1a4fbc (patch)
tree04fa32f4cfd96cdc81f8df3265ed36644a3e563f /net/sctp/endpointola.c
parentdd86d136f9feb72c52a5b07707affe80edbc8dda (diff)
[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>
Diffstat (limited to 'net/sctp/endpointola.c')
-rw-r--r--net/sctp/endpointola.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index c543f3250645..5ffb1af336c0 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -257,16 +257,14 @@ static struct sctp_association *__sctp_endpoint_lookup_assoc(
257 int rport; 257 int rport;
258 struct sctp_association *asoc; 258 struct sctp_association *asoc;
259 struct list_head *pos; 259 struct list_head *pos;
260 union sctp_addr tmp;
261 flip_to_n(&tmp, paddr);
262 260
263 rport = paddr->v4.sin_port; 261 rport = ntohs(paddr->v4.sin_port);
264 262
265 list_for_each(pos, &ep->asocs) { 263 list_for_each(pos, &ep->asocs) {
266 asoc = list_entry(pos, struct sctp_association, asocs); 264 asoc = list_entry(pos, struct sctp_association, asocs);
267 if (rport == asoc->peer.port) { 265 if (rport == asoc->peer.port) {
268 sctp_read_lock(&asoc->base.addr_lock); 266 sctp_read_lock(&asoc->base.addr_lock);
269 *transport = sctp_assoc_lookup_paddr(asoc, &tmp); 267 *transport = sctp_assoc_lookup_paddr(asoc, paddr);
270 sctp_read_unlock(&asoc->base.addr_lock); 268 sctp_read_unlock(&asoc->base.addr_lock);
271 269
272 if (*transport) 270 if (*transport)
@@ -348,8 +346,10 @@ static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep)
348 * COOKIE-ECHO chunk. 346 * COOKIE-ECHO chunk.
349 */ 347 */
350 if (NULL == chunk->asoc) { 348 if (NULL == chunk->asoc) {
349 union sctp_addr tmp;
350 flip_to_n(&tmp, sctp_source(chunk));
351 asoc = sctp_endpoint_lookup_assoc(ep, 351 asoc = sctp_endpoint_lookup_assoc(ep,
352 sctp_source(chunk), 352 &tmp,
353 &transport); 353 &transport);
354 chunk->asoc = asoc; 354 chunk->asoc = asoc;
355 chunk->transport = transport; 355 chunk->transport = transport;