diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:12:07 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:50 -0500 |
commit | 02a8a4db3b38ad2dd8bcfcca41694e043e44d282 (patch) | |
tree | 5c6fb13ee6e7e2ede8b245d35f3602b5efadc661 /net/sctp/bind_addr.c | |
parent | 6c7be55ca0c204473d07a030a03c49a7471b4508 (diff) |
[SCTP]: sctp_copy_one_addr() switched to net-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/bind_addr.c')
-rw-r--r-- | net/sctp/bind_addr.c | 8 |
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; |