[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>
This commit is contained in:
Al Viro 2006-11-20 17:09:40 -08:00 committed by David S. Miller
parent 9b1dfad011
commit d55c41b115
4 changed files with 11 additions and 20 deletions

View file

@ -252,7 +252,7 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
int is_saddr)
{
void *from;
__u16 *port;
__be16 *port;
struct sctphdr *sh;
port = &addr->v4.sin_port;
@ -260,10 +260,10 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
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));