aboutsummaryrefslogtreecommitdiff
path: root/net/sctp/ipv6.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/ipv6.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/ipv6.c')
-rw-r--r--net/sctp/ipv6.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 1f9f5ec0759..e533970fa33 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -161,17 +161,17 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport,
/* Fill in the dest address from the route entry passed with the skb
* and the source address from the transport.
*/
- ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr.v6.sin6_addr);
- ipv6_addr_copy(&fl.fl6_src, &transport->saddr.v6.sin6_addr);
+ ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr_h.v6.sin6_addr);
+ ipv6_addr_copy(&fl.fl6_src, &transport->saddr_h.v6.sin6_addr);
fl.fl6_flowlabel = np->flow_label;
IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel);
if (ipv6_addr_type(&fl.fl6_src) & IPV6_ADDR_LINKLOCAL)
- fl.oif = transport->saddr.v6.sin6_scope_id;
+ fl.oif = transport->saddr_h.v6.sin6_scope_id;
else
fl.oif = sk->sk_bound_dev_if;
fl.fl_ip_sport = inet_sk(sk)->sport;
- fl.fl_ip_dport = transport->ipaddr.v6.sin6_port;
+ fl.fl_ip_dport = transport->ipaddr_h.v6.sin6_port;
if (np->opt && np->opt->srcrt) {
struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
@@ -290,11 +290,11 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
list_for_each(pos, &bp->address_list) {
laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
if ((laddr->use_as_src) &&
- (laddr->a.sa.sa_family == AF_INET6) &&
- (scope <= sctp_scope(&laddr->a))) {
- bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
+ (laddr->a_h.sa.sa_family == AF_INET6) &&
+ (scope <= sctp_scope(&laddr->a_h))) {
+ bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a_h);
if (!baddr || (matchlen < bmatchlen)) {
- baddr = &laddr->a;
+ baddr = &laddr->a_h;
matchlen = bmatchlen;
}
}
@@ -332,10 +332,10 @@ static void sctp_v6_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.v6.sin6_family = AF_INET6;
- addr->a.v6.sin6_port = 0;
- addr->a.v6.sin6_addr = ifp->addr;
- addr->a.v6.sin6_scope_id = dev->ifindex;
+ addr->a_h.v6.sin6_family = AF_INET6;
+ addr->a_h.v6.sin6_port = 0;
+ addr->a_h.v6.sin6_addr = ifp->addr;
+ addr->a_h.v6.sin6_scope_id = dev->ifindex;
INIT_LIST_HEAD(&addr->list);
list_add_tail(&addr->list, addrlist);
}