summaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-21 02:08:09 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 06:26:40 +0100
commit1c7d1fc14974f44809b22521bd9796411d8ba440 (patch)
tree11e7c6f95ca995ccb7941adc5912ee82eb52b130 /net/sctp/input.c
parent[SCTP]: Switch sctp_del_bind_addr() to net-endian. (diff)
downloadlinux-1c7d1fc14974f44809b22521bd9796411d8ba440.tar.xz
linux-1c7d1fc14974f44809b22521bd9796411d8ba440.zip
[SCTP]: Switch sctp_endpoint_is_match() to net-endian.
The only caller (__sctp_rcv_lookup_endpoint()) also switched, its caller adjusted Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/sctp/input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 6d82f400d13c..1bb3f264da1f 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -127,6 +127,7 @@ int sctp_rcv(struct sk_buff *skb)
struct sctphdr *sh;
union sctp_addr src;
union sctp_addr dest;
+ union sctp_addr tmp;
int family;
struct sctp_af *af;
@@ -180,8 +181,10 @@ int sctp_rcv(struct sk_buff *skb)
asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport);
+ flip_to_n(&tmp, &dest);
+
if (!asoc)
- ep = __sctp_rcv_lookup_endpoint(&dest);
+ ep = __sctp_rcv_lookup_endpoint(&tmp);
/* Retrieve the common input handling substructure. */
rcvr = asoc ? &asoc->base : &ep->base;
@@ -726,7 +729,7 @@ static struct sctp_endpoint *__sctp_rcv_lookup_endpoint(const union sctp_addr *l
struct sctp_endpoint *ep;
int hash;
- hash = sctp_ep_hashfn(laddr->v4.sin_port);
+ hash = sctp_ep_hashfn(ntohs(laddr->v4.sin_port));
head = &sctp_ep_hashtable[hash];
read_lock(&head->lock);
for (epb = head->chain; epb; epb = epb->next) {