]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/input.c
[PATCH] tty: switch to ktermios and new framework
[linux-2.6-omap-h63xx.git] / net / sctp / input.c
index 1bb3f264da1f3f278e9835f6b133aa32ac7dfc7d..33111873a488eaf78b63907d73da6ce6ad9cc9fd 100644 (file)
@@ -127,7 +127,6 @@ 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;
 
@@ -181,10 +180,8 @@ 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(&tmp);
+               ep = __sctp_rcv_lookup_endpoint(&dest);
 
        /* Retrieve the common input handling substructure. */
        rcvr = asoc ? &asoc->base : &ep->base;
@@ -833,7 +830,7 @@ static struct sctp_association *__sctp_lookup_association(
        /* Optimize here for direct hit, only listening connections can
         * have wildcards anyways.
         */
-       hash = sctp_assoc_hashfn(local->v4.sin_port, peer->v4.sin_port);
+       hash = sctp_assoc_hashfn(ntohs(local->v4.sin_port), ntohs(peer->v4.sin_port));
        head = &sctp_assoc_hashtable[hash];
        read_lock(&head->lock);
        for (epb = head->chain; epb; epb = epb->next) {
@@ -960,7 +957,7 @@ static struct sctp_association *__sctp_rcv_init_lookup(struct sk_buff *skb,
                if (!af)
                        continue;
 
-               af->from_addr_param(paddr, params.addr, ntohs(sh->source), 0);
+               af->from_addr_param(paddr, params.addr, sh->source, 0);
 
                asoc = __sctp_lookup_association(laddr, paddr, &transport);
                if (asoc)