提交 f235fca3 编写于 作者: A Al Viro 提交者: David S. Miller

[SCTP]: sctp_init_addrs() switched to net-endian.

Caller adjusted.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e2fccedb
......@@ -245,7 +245,7 @@ int sctp_rcv(struct sk_buff *skb)
chunk->sctp_hdr = sh;
/* Set the source and destination addresses of the incoming chunk. */
sctp_init_addrs(chunk, &src, &dest);
sctp_init_addrs(chunk, &tmp2, &tmp);
/* Remember where we came from. */
chunk->transport = transport;
......
......@@ -1031,9 +1031,9 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src,
union sctp_addr *dest)
{
memcpy(&chunk->source_h, src, sizeof(union sctp_addr));
flip_to_n(&chunk->source, &chunk->source_h);
memcpy(&chunk->dest, dest, sizeof(union sctp_addr));
memcpy(&chunk->source, src, sizeof(union sctp_addr));
flip_to_h(&chunk->source_h, &chunk->source);
flip_to_h(&chunk->dest, dest);
}
/* Extract the source address from a chunk. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册