aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/transport.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:04:42 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:30 -0500
commit2a6fd78adec062f16f8662563115679e669efaca (patch)
tree3c2e93e5cccb7a11176079509e55f103464b1b98 /net/sctp/transport.c
parent09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5 (diff)
[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 'net/sctp/transport.c')
-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,
62{ 62{
63 /* Copy in the address. */ 63 /* Copy in the address. */
64 peer->ipaddr_h = *addr; 64 peer->ipaddr_h = *addr;
65 flip_to_n(&peer->ipaddr, &peer->ipaddr_h);
65 peer->af_specific = sctp_get_af_specific(addr->sa.sa_family); 66 peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
66 peer->asoc = NULL; 67 peer->asoc = NULL;
67 68
68 peer->dst = NULL; 69 peer->dst = NULL;
70 memset(&peer->saddr, 0, sizeof(union sctp_addr));
69 memset(&peer->saddr_h, 0, sizeof(union sctp_addr)); 71 memset(&peer->saddr_h, 0, sizeof(union sctp_addr));
70 72
71 /* From 6.3.1 RTO Calculation: 73 /* From 6.3.1 RTO Calculation:
@@ -258,6 +260,7 @@ void sctp_transport_route(struct sctp_transport *transport,
258 memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); 260 memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
259 else 261 else
260 af->get_saddr(asoc, dst, daddr, &transport->saddr_h); 262 af->get_saddr(asoc, dst, daddr, &transport->saddr_h);
263 flip_to_n(&transport->saddr, &transport->saddr_h);
261 264
262 transport->dst = dst; 265 transport->dst = dst;
263 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { 266 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {