aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:04:10 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:29 -0500
commit09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5 (patch)
treeb293f6aa012265dcb413d7dd6c0b68b1f2676b9f /net/sctp/sm_make_chunk.c
parent30330ee00ce077de9d459c17125573ff618bd7a9 (diff)
[SCTP]: Beginning of conversion to net-endian for embedded sctp_addr.
Part 1: rename sctp_chunk->source, sctp_sockaddr_entry->a, sctp_transport->ipaddr and sctp_transport->saddr (to ..._h) The next patch will reintroduce these fields and keep them as net-endian mirrors of the original (renamed) ones. Split in two patches to make sure that we hadn't forgotten any instanes. Later in the series we'll eliminate uses of host-endian variants (basically switching users to net-endian counterparts as we progress through that mess). Then host-endian ones will die. Other embedded host-endian sctp_addr will be easier to switch directly, so we leave them alone for now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r--net/sctp/sm_make_chunk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index ccbba6b24d1d..13109cfc3ae5 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1031,7 +1031,7 @@ 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, src, sizeof(union sctp_addr)); 1034 memcpy(&chunk->source_h, src, sizeof(union sctp_addr));
1035 memcpy(&chunk->dest, dest, sizeof(union sctp_addr)); 1035 memcpy(&chunk->dest, dest, sizeof(union sctp_addr));
1036} 1036}
1037 1037
@@ -1040,10 +1040,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk)
1040{ 1040{
1041 /* If we have a known transport, use that. */ 1041 /* If we have a known transport, use that. */
1042 if (chunk->transport) { 1042 if (chunk->transport) {
1043 return &chunk->transport->ipaddr; 1043 return &chunk->transport->ipaddr_h;
1044 } else { 1044 } else {
1045 /* Otherwise, extract it from the IP header. */ 1045 /* Otherwise, extract it from the IP header. */
1046 return &chunk->source; 1046 return &chunk->source_h;
1047 } 1047 }
1048} 1048}
1049 1049
@@ -2594,7 +2594,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
2594 sctp_write_lock(&asoc->base.addr_lock); 2594 sctp_write_lock(&asoc->base.addr_lock);
2595 list_for_each(pos, &bp->address_list) { 2595 list_for_each(pos, &bp->address_list) {
2596 saddr = list_entry(pos, struct sctp_sockaddr_entry, list); 2596 saddr = list_entry(pos, struct sctp_sockaddr_entry, list);
2597 if (sctp_cmp_addr_exact(&saddr->a, &addr)) 2597 if (sctp_cmp_addr_exact(&saddr->a_h, &addr))
2598 saddr->use_as_src = 1; 2598 saddr->use_as_src = 1;
2599 } 2599 }
2600 sctp_write_unlock(&asoc->base.addr_lock); 2600 sctp_write_unlock(&asoc->base.addr_lock);