Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41814
b: refs/heads/master
c: 1c7d1fc
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent 8a27d5c commit cad6c66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9a08505ec0a0260fc94a823c014cc3970f72d25
refs/heads/master: 1c7d1fc14974f44809b22521bd9796411d8ba440
6 changes: 2 additions & 4 deletions trunk/net/sctp/endpointola.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,10 @@ struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *ep,
const union sctp_addr *laddr)
{
struct sctp_endpoint *retval;
union sctp_addr tmp;
flip_to_n(&tmp, laddr);

sctp_read_lock(&ep->base.addr_lock);
if (ep->base.bind_addr.port == laddr->v4.sin_port) {
if (sctp_bind_addr_match(&ep->base.bind_addr, &tmp,
if (htons(ep->base.bind_addr.port) == laddr->v4.sin_port) {
if (sctp_bind_addr_match(&ep->base.bind_addr, laddr,
sctp_sk(ep->base.sk))) {
retval = ep;
goto out;
Expand Down
7 changes: 5 additions & 2 deletions trunk/net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit cad6c66

Please sign in to comment.