summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c9a0850)
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>
const union sctp_addr *laddr)
{
struct sctp_endpoint *retval;
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);
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;
sctp_sk(ep->base.sk))) {
retval = ep;
goto out;
struct sctphdr *sh;
union sctp_addr src;
union sctp_addr dest;
struct sctphdr *sh;
union sctp_addr src;
union sctp_addr dest;
int family;
struct sctp_af *af;
int family;
struct sctp_af *af;
asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport);
asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport);
+ flip_to_n(&tmp, &dest);
+
- ep = __sctp_rcv_lookup_endpoint(&dest);
+ ep = __sctp_rcv_lookup_endpoint(&tmp);
/* Retrieve the common input handling substructure. */
rcvr = asoc ? &asoc->base : &ep->base;
/* Retrieve the common input handling substructure. */
rcvr = asoc ? &asoc->base : &ep->base;
struct sctp_endpoint *ep;
int hash;
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) {
head = &sctp_ep_hashtable[hash];
read_lock(&head->lock);
for (epb = head->chain; epb; epb = epb->next) {