aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:09:40 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:44 -0500
commitd55c41b115e74b30a3d1a61db806bd03bdd9dd6f (patch)
tree24591dcdbcd8b3c84599b64e6c01bd5a16974473 /net/sctp/protocol.c
parent9b1dfad011d409bc56476a81810342751645ee54 (diff)
[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>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index d1fbd1f5c6d1..d08bafd4439e 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -252,7 +252,7 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
252 int is_saddr) 252 int is_saddr)
253{ 253{
254 void *from; 254 void *from;
255 __u16 *port; 255 __be16 *port;
256 struct sctphdr *sh; 256 struct sctphdr *sh;
257 257
258 port = &addr->v4.sin_port; 258 port = &addr->v4.sin_port;
@@ -260,10 +260,10 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
260 260
261 sh = (struct sctphdr *) skb->h.raw; 261 sh = (struct sctphdr *) skb->h.raw;
262 if (is_saddr) { 262 if (is_saddr) {
263 *port = ntohs(sh->source); 263 *port = sh->source;
264 from = &skb->nh.iph->saddr; 264 from = &skb->nh.iph->saddr;
265 } else { 265 } else {
266 *port = ntohs(sh->dest); 266 *port = sh->dest;
267 from = &skb->nh.iph->daddr; 267 from = &skb->nh.iph->daddr;
268 } 268 }
269 memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr)); 269 memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr));