summaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 17:04:10 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:26:29 -0800
commit09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5 (patch)
treeb293f6aa012265dcb413d7dd6c0b68b1f2676b9f /net/sctp/protocol.c
parent30330ee00ce077de9d459c17125573ff618bd7a9 (diff)
downloadblackbird-op-linux-09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5.tar.gz
blackbird-op-linux-09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5.zip
[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/protocol.c')
-rw-r--r--net/sctp/protocol.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 4310e7fac443..20883ffd51d9 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -150,9 +150,9 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist,
/* Add the address to the local list. */
addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC);
if (addr) {
- addr->a.v4.sin_family = AF_INET;
- addr->a.v4.sin_port = 0;
- addr->a.v4.sin_addr.s_addr = ifa->ifa_local;
+ addr->a_h.v4.sin_family = AF_INET;
+ addr->a_h.v4.sin_port = 0;
+ addr->a_h.v4.sin_addr.s_addr = ifa->ifa_local;
list_add_tail(&addr->list, addrlist);
}
}
@@ -223,17 +223,17 @@ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
sctp_spin_lock_irqsave(&sctp_local_addr_lock, flags);
list_for_each(pos, &sctp_local_addr_list) {
addr = list_entry(pos, struct sctp_sockaddr_entry, list);
- if (sctp_in_scope(&addr->a, scope)) {
+ if (sctp_in_scope(&addr->a_h, scope)) {
/* Now that the address is in scope, check to see if
* the address type is really supported by the local
* sock as well as the remote peer.
*/
- if ((((AF_INET == addr->a.sa.sa_family) &&
+ if ((((AF_INET == addr->a_h.sa.sa_family) &&
(copy_flags & SCTP_ADDR4_PEERSUPP))) ||
- (((AF_INET6 == addr->a.sa.sa_family) &&
+ (((AF_INET6 == addr->a_h.sa.sa_family) &&
(copy_flags & SCTP_ADDR6_ALLOWED) &&
(copy_flags & SCTP_ADDR6_PEERSUPP)))) {
- error = sctp_add_bind_addr(bp, &addr->a, 1,
+ error = sctp_add_bind_addr(bp, &addr->a_h, 1,
GFP_ATOMIC);
if (error)
goto end_copy;
@@ -482,7 +482,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
if (!laddr->use_as_src)
continue;
sctp_v4_dst_saddr(&dst_saddr, dst, bp->port);
- if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a))
+ if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a_h))
goto out_unlock;
}
sctp_read_unlock(addr_lock);
@@ -502,8 +502,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
if ((laddr->use_as_src) &&
- (AF_INET == laddr->a.sa.sa_family)) {
- fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
+ (AF_INET == laddr->a_h.sa.sa_family)) {
+ fl.fl4_src = laddr->a_h.v4.sin_addr.s_addr;
if (!ip_route_output_key(&rt, &fl)) {
dst = &rt->u.dst;
goto out_unlock;
OpenPOWER on IntegriCloud