aboutsummaryrefslogtreecommitdiff
path: root/net/sctp/transport.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 17:12:41 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:26:52 -0800
commitd3f7a54a295f2ffc9033b425c6538a7e9d7fbe8a (patch)
treea6f32788e62edc9e29194684334e41db50119f1c /net/sctp/transport.c
parent6a1e5f335461567f593e88b218f1c06817cbd323 (diff)
[SCTP]: ->get_saddr() switched to net-endian.
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index e1448addcd9..74faa1b6dbf 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -256,11 +256,13 @@ void sctp_transport_route(struct sctp_transport *transport,
dst = af->get_dst(asoc, daddr, saddr);
- if (saddr)
+ if (saddr) {
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);
+ flip_to_n(&transport->saddr, &transport->saddr_h);
+ } else {
+ af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr);
+ flip_to_h(&transport->saddr_h, &transport->saddr);
+ }
transport->dst = dst;
if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {