From 09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 20 Nov 2006 17:04:10 -0800 Subject: [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 Signed-off-by: David S. Miller --- net/sctp/sm_make_chunk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/sctp/sm_make_chunk.c') diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index ccbba6b24d1..13109cfc3ae 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -1031,7 +1031,7 @@ nodata: void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src, union sctp_addr *dest) { - memcpy(&chunk->source, src, sizeof(union sctp_addr)); + memcpy(&chunk->source_h, src, sizeof(union sctp_addr)); memcpy(&chunk->dest, dest, sizeof(union sctp_addr)); } @@ -1040,10 +1040,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk) { /* If we have a known transport, use that. */ if (chunk->transport) { - return &chunk->transport->ipaddr; + return &chunk->transport->ipaddr_h; } else { /* Otherwise, extract it from the IP header. */ - return &chunk->source; + return &chunk->source_h; } } @@ -2594,7 +2594,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, sctp_write_lock(&asoc->base.addr_lock); list_for_each(pos, &bp->address_list) { saddr = list_entry(pos, struct sctp_sockaddr_entry, list); - if (sctp_cmp_addr_exact(&saddr->a, &addr)) + if (sctp_cmp_addr_exact(&saddr->a_h, &addr)) saddr->use_as_src = 1; } sctp_write_unlock(&asoc->base.addr_lock); -- cgit v1.2.3