diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:13:01 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:53 -0500 |
commit | cb7b4a0dcf67ae747406b58b1cdc875916019739 (patch) | |
tree | 40f56935b7405c0106ccd15f95f940f4de6c082d /net/sctp | |
parent | d3f7a54a295f2ffc9033b425c6538a7e9d7fbe8a (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/sctp')
-rw-r--r-- | net/sctp/transport.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 74faa1b6dbfe..33e7d85f1119 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -234,7 +234,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport) | |||
234 | { | 234 | { |
235 | struct dst_entry *dst; | 235 | struct dst_entry *dst; |
236 | 236 | ||
237 | dst = transport->af_specific->get_dst(NULL, &transport->ipaddr_h, NULL); | 237 | dst = transport->af_specific->get_dst(NULL, &transport->ipaddr, NULL); |
238 | 238 | ||
239 | if (dst) { | 239 | if (dst) { |
240 | transport->pathmtu = dst_mtu(dst); | 240 | transport->pathmtu = dst_mtu(dst); |
@@ -251,16 +251,18 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
251 | { | 251 | { |
252 | struct sctp_association *asoc = transport->asoc; | 252 | struct sctp_association *asoc = transport->asoc; |
253 | struct sctp_af *af = transport->af_specific; | 253 | struct sctp_af *af = transport->af_specific; |
254 | union sctp_addr *daddr = &transport->ipaddr_h; | 254 | union sctp_addr *daddr = &transport->ipaddr; |
255 | struct dst_entry *dst; | 255 | struct dst_entry *dst; |
256 | union sctp_addr tmp; | ||
257 | flip_to_n(&tmp, saddr); | ||
256 | 258 | ||
257 | dst = af->get_dst(asoc, daddr, saddr); | 259 | dst = af->get_dst(asoc, daddr, &tmp); |
258 | 260 | ||
259 | if (saddr) { | 261 | if (saddr) { |
260 | memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); | 262 | memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); |
261 | flip_to_n(&transport->saddr, &transport->saddr_h); | 263 | flip_to_n(&transport->saddr, &transport->saddr_h); |
262 | } else { | 264 | } else { |
263 | af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr); | 265 | af->get_saddr(asoc, dst, daddr, &transport->saddr); |
264 | flip_to_h(&transport->saddr_h, &transport->saddr); | 266 | flip_to_h(&transport->saddr_h, &transport->saddr); |
265 | } | 267 | } |
266 | 268 | ||