[SCTP]: Switch ->from_skb() to net-endian.

All instances switched, callers updated.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 0e5ac5e..3b4a552 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -127,7 +127,6 @@
 	struct sctphdr *sh;
 	union sctp_addr src;
 	union sctp_addr dest;
-	union sctp_addr tmp, tmp2;
 	int family;
 	struct sctp_af *af;
 
@@ -179,13 +178,10 @@
 	    !af->addr_valid(&dest, NULL, skb))
 		goto discard_it;
 
-	flip_to_n(&tmp, &dest);
-	flip_to_n(&tmp2, &src);
-
-	asoc = __sctp_rcv_lookup(skb, &tmp2, &tmp, &transport);
+	asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport);
 
 	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;
@@ -245,7 +241,7 @@
 	chunk->sctp_hdr = sh;
 
 	/* Set the source and destination addresses of the incoming chunk.  */
-	sctp_init_addrs(chunk, &tmp2, &tmp);
+	sctp_init_addrs(chunk, &src, &dest);
 
 	/* Remember where we came from.  */
 	chunk->transport = transport;
@@ -444,7 +440,6 @@
 	struct sock *sk = NULL;
 	struct sctp_association *asoc;
 	struct sctp_transport *transport = NULL;
-	union sctp_addr tmp, tmp2;
 
 	*app = NULL; *tpp = NULL;
 
@@ -456,13 +451,11 @@
 	/* Initialize local addresses for lookups. */
 	af->from_skb(&saddr, skb, 1);
 	af->from_skb(&daddr, skb, 0);
-	flip_to_n(&tmp, &saddr);
-	flip_to_n(&tmp2, &daddr);
 
 	/* Look for an association that matches the incoming ICMP error
 	 * packet.
 	 */
-	asoc = __sctp_lookup_association(&tmp, &tmp2, &transport);
+	asoc = __sctp_lookup_association(&saddr, &daddr, &transport);
 	if (!asoc)
 		return NULL;
 
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 6139d1d..d6b585b 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -351,7 +351,7 @@
 			     int is_saddr)
 {
 	void *from;
-	__u16 *port;
+	__be16 *port;
 	struct sctphdr *sh;
 
 	port = &addr->v6.sin6_port;
@@ -361,10 +361,10 @@
 
 	sh = (struct sctphdr *) skb->h.raw;
 	if (is_saddr) {
-		*port  = ntohs(sh->source);
+		*port  = sh->source;
 		from = &skb->nh.ipv6h->saddr;
 	} else {
-		*port = ntohs(sh->dest);
+		*port = sh->dest;
 		from = &skb->nh.ipv6h->daddr;
 	}
 	ipv6_addr_copy(&addr->v6.sin6_addr, from);
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index d1fbd1f..d08bafd 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -252,7 +252,7 @@
 			     int is_saddr)
 {
 	void *from;
-	__u16 *port;
+	__be16 *port;
 	struct sctphdr *sh;
 
 	port = &addr->v4.sin_port;
@@ -260,10 +260,10 @@
 
 	sh = (struct sctphdr *) skb->h.raw;
 	if (is_saddr) {
-		*port  = ntohs(sh->source);
+		*port  = sh->source;
 		from = &skb->nh.iph->saddr;
 	} else {
-		*port = ntohs(sh->dest);
+		*port = sh->dest;
 		from = &skb->nh.iph->daddr;
 	}
 	memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr));
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 5953636..632a115 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1227,7 +1227,6 @@
 	struct sk_buff *skb;
 	sctp_scope_t scope;
 	struct sctp_af *af;
-	union sctp_addr tmp;
 
 	/* Create the bare association.  */
 	scope = sctp_scope(sctp_source(chunk));
@@ -1240,8 +1239,7 @@
 	af = sctp_get_af_specific(ipver2af(skb->nh.iph->version));
 	if (unlikely(!af))
 		goto fail;
-	af->from_skb(&tmp, skb, 1);
-	flip_to_n(&asoc->c.peer_addr, &tmp);
+	af->from_skb(&asoc->c.peer_addr, skb, 1);
 nodata:
 	return asoc;