aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 17:13:01 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:26:53 -0800
commitcb7b4a0dcf67ae747406b58b1cdc875916019739 (patch)
tree40f56935b7405c0106ccd15f95f940f4de6c082d /net
parentd3f7a54a295f2ffc9033b425c6538a7e9d7fbe8a (diff)
[SCTP]: Pass net-endian to ->get_dst().
all instances are actually endian-agnostic... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-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 74faa1b6dbf..33e7d85f111 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -234,7 +234,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport)
{
struct dst_entry *dst;
- dst = transport->af_specific->get_dst(NULL, &transport->ipaddr_h, NULL);
+ dst = transport->af_specific->get_dst(NULL, &transport->ipaddr, NULL);
if (dst) {
transport->pathmtu = dst_mtu(dst);
@@ -251,16 +251,18 @@ void sctp_transport_route(struct sctp_transport *transport,
{
struct sctp_association *asoc = transport->asoc;
struct sctp_af *af = transport->af_specific;
- union sctp_addr *daddr = &transport->ipaddr_h;
+ union sctp_addr *daddr = &transport->ipaddr;
struct dst_entry *dst;
+ union sctp_addr tmp;
+ flip_to_n(&tmp, saddr);
- dst = af->get_dst(asoc, daddr, saddr);
+ dst = af->get_dst(asoc, daddr, &tmp);
if (saddr) {
memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
flip_to_n(&transport->saddr, &transport->saddr_h);
} else {
- af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr);
+ af->get_saddr(asoc, dst, daddr, &transport->saddr);
flip_to_h(&transport->saddr_h, &transport->saddr);
}