aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/bind_addr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
index fd0f812f8a46..50f3697625fd 100644
--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -77,7 +77,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
77 /* Extract the addresses which are relevant for this scope. */ 77 /* Extract the addresses which are relevant for this scope. */
78 list_for_each(pos, &src->address_list) { 78 list_for_each(pos, &src->address_list) {
79 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 79 addr = list_entry(pos, struct sctp_sockaddr_entry, list);
80 error = sctp_copy_one_addr(dest, &addr->a_h, scope, 80 error = sctp_copy_one_addr(dest, &addr->a, scope,
81 gfp, flags); 81 gfp, flags);
82 if (error < 0) 82 if (error < 0)
83 goto out; 83 goto out;
@@ -91,7 +91,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
91 list_for_each(pos, &src->address_list) { 91 list_for_each(pos, &src->address_list) {
92 addr = list_entry(pos, struct sctp_sockaddr_entry, 92 addr = list_entry(pos, struct sctp_sockaddr_entry,
93 list); 93 list);
94 error = sctp_copy_one_addr(dest, &addr->a_h, 94 error = sctp_copy_one_addr(dest, &addr->a,
95 SCTP_SCOPE_LINK, gfp, 95 SCTP_SCOPE_LINK, gfp,
96 flags); 96 flags);
97 if (error < 0) 97 if (error < 0)
@@ -358,8 +358,6 @@ static int sctp_copy_one_addr(struct sctp_bind_addr *dest,
358 int flags) 358 int flags)
359{ 359{
360 int error = 0; 360 int error = 0;
361 union sctp_addr tmp;
362 flip_to_n(&tmp, addr);
363 361
364 if (sctp_is_any(addr)) { 362 if (sctp_is_any(addr)) {
365 error = sctp_copy_local_addr_list(dest, scope, gfp, flags); 363 error = sctp_copy_local_addr_list(dest, scope, gfp, flags);
@@ -373,7 +371,7 @@ static int sctp_copy_one_addr(struct sctp_bind_addr *dest,
373 (((AF_INET6 == addr->sa.sa_family) && 371 (((AF_INET6 == addr->sa.sa_family) &&
374 (flags & SCTP_ADDR6_ALLOWED) && 372 (flags & SCTP_ADDR6_ALLOWED) &&
375 (flags & SCTP_ADDR6_PEERSUPP)))) 373 (flags & SCTP_ADDR6_PEERSUPP))))
376 error = sctp_add_bind_addr(dest, &tmp, 1, gfp); 374 error = sctp_add_bind_addr(dest, addr, 1, gfp);
377 } 375 }
378 376
379 return error; 377 return error;