aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/input.c2
-rw-r--r--net/sctp/sm_make_chunk.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 85b3441c4a23..0e5ac5e42c96 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -245,7 +245,7 @@ int sctp_rcv(struct sk_buff *skb)
245 chunk->sctp_hdr = sh; 245 chunk->sctp_hdr = sh;
246 246
247 /* Set the source and destination addresses of the incoming chunk. */ 247 /* Set the source and destination addresses of the incoming chunk. */
248 sctp_init_addrs(chunk, &src, &dest); 248 sctp_init_addrs(chunk, &tmp2, &tmp);
249 249
250 /* Remember where we came from. */ 250 /* Remember where we came from. */
251 chunk->transport = transport; 251 chunk->transport = transport;
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index cb8cecd85a2e..b5d4a61ed7a7 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1031,9 +1031,9 @@ nodata:
1031void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src, 1031void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src,
1032 union sctp_addr *dest) 1032 union sctp_addr *dest)
1033{ 1033{
1034 memcpy(&chunk->source_h, src, sizeof(union sctp_addr)); 1034 memcpy(&chunk->source, src, sizeof(union sctp_addr));
1035 flip_to_n(&chunk->source, &chunk->source_h); 1035 flip_to_h(&chunk->source_h, &chunk->source);
1036 memcpy(&chunk->dest, dest, sizeof(union sctp_addr)); 1036 flip_to_h(&chunk->dest, dest);
1037} 1037}
1038 1038
1039/* Extract the source address from a chunk. */ 1039/* Extract the source address from a chunk. */