aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/transport.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 17:04:42 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:26:30 -0800
commit2a6fd78adec062f16f8662563115679e669efaca (patch)
tree3c2e93e5cccb7a11176079509e55f103464b1b98 /net/sctp/transport.c
parent[SCTP]: Beginning of conversion to net-endian for embedded sctp_addr. (diff)
downloadlinux-dev-2a6fd78adec062f16f8662563115679e669efaca.tar.xz
linux-dev-2a6fd78adec062f16f8662563115679e669efaca.zip
[SCTP] embedded sctp_addr: net-endian mirrors
Add sctp_chunk->source, sctp_sockaddr_entry->a, sctp_transport->ipaddr and sctp_transport->saddr, maintain them as net-endian mirrors of their host-endian counterparts. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/sctp/transport.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 1f56c9d95739..bacd09448b8e 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -62,10 +62,12 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
{
/* Copy in the address. */
peer->ipaddr_h = *addr;
+ flip_to_n(&peer->ipaddr, &peer->ipaddr_h);
peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
peer->asoc = NULL;
peer->dst = NULL;
+ memset(&peer->saddr, 0, sizeof(union sctp_addr));
memset(&peer->saddr_h, 0, sizeof(union sctp_addr));
/* From 6.3.1 RTO Calculation:
@@ -258,6 +260,7 @@ void sctp_transport_route(struct sctp_transport *transport,
memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
else
af->get_saddr(asoc, dst, daddr, &transport->saddr_h);
+ flip_to_n(&transport->saddr, &transport->saddr_h);
transport->dst = dst;
if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {