[SCTP]: sctp_has_association() switched to net-endian.
[safe/jmp/linux-2.6] / net / sctp / input.c
index 3b4a552..3311187 100644 (file)
@@ -872,11 +872,8 @@ int sctp_has_association(const union sctp_addr *laddr,
 {
        struct sctp_association *asoc;
        struct sctp_transport *transport;
-       union sctp_addr tmp, tmp2;
-       flip_to_n(&tmp, laddr);
-       flip_to_n(&tmp2, paddr);
 
-       if ((asoc = sctp_lookup_association(&tmp, &tmp2, &transport))) {
+       if ((asoc = sctp_lookup_association(laddr, paddr, &transport))) {
                sctp_association_put(asoc);
                return 1;
        }
@@ -914,7 +911,6 @@ static struct sctp_association *__sctp_rcv_init_lookup(struct sk_buff *skb,
        sctp_init_chunk_t *init;
        struct sctp_transport *transport;
        struct sctp_af *af;
-       union sctp_addr tmp2;
 
        ch = (sctp_chunkhdr_t *) skb->data;
 
@@ -961,10 +957,9 @@ 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);
-               flip_to_n(&tmp2, paddr);
+               af->from_addr_param(paddr, params.addr, sh->source, 0);
 
-               asoc = __sctp_lookup_association(laddr, &tmp2, &transport);
+               asoc = __sctp_lookup_association(laddr, paddr, &transport);
                if (asoc)
                        return asoc;
        }