mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
[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:
parent
9b1dfad011
commit
d55c41b115
4 changed files with 11 additions and 20 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue