diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-06 19:32:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-08 17:05:14 -0400 |
commit | 8663c938ceb72f47941c95ff0ea491ebbdd68f26 (patch) | |
tree | f87bf63fb7f8ca29e01083e742c0530c25a9feb9 /net/sctp | |
parent | b57ae01a8a8446dbbed7365c9b05aef1fc6dea20 (diff) |
sctp: Store a flowi in transports to provide persistent keying.
Several future simplifications are possible now because of this.
For example, the sctp_addr unions can simply refer directly to
the flowi information.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/transport.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index d8595dd1a8a7..394c57ca2f54 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -213,13 +213,11 @@ void sctp_transport_set_owner(struct sctp_transport *transport, | |||
213 | /* Initialize the pmtu of a transport. */ | 213 | /* Initialize the pmtu of a transport. */ |
214 | void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk) | 214 | void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk) |
215 | { | 215 | { |
216 | struct flowi fl; | ||
217 | |||
218 | /* If we don't have a fresh route, look one up */ | 216 | /* If we don't have a fresh route, look one up */ |
219 | if (!transport->dst || transport->dst->obsolete > 1) { | 217 | if (!transport->dst || transport->dst->obsolete > 1) { |
220 | dst_release(transport->dst); | 218 | dst_release(transport->dst); |
221 | transport->af_specific->get_dst(transport, &transport->saddr, | 219 | transport->af_specific->get_dst(transport, &transport->saddr, |
222 | &fl, sk); | 220 | &transport->fl, sk); |
223 | } | 221 | } |
224 | 222 | ||
225 | if (transport->dst) { | 223 | if (transport->dst) { |
@@ -274,14 +272,13 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
274 | { | 272 | { |
275 | struct sctp_association *asoc = transport->asoc; | 273 | struct sctp_association *asoc = transport->asoc; |
276 | struct sctp_af *af = transport->af_specific; | 274 | struct sctp_af *af = transport->af_specific; |
277 | struct flowi fl; | ||
278 | 275 | ||
279 | af->get_dst(transport, saddr, &fl, sctp_opt2sk(opt)); | 276 | af->get_dst(transport, saddr, &transport->fl, sctp_opt2sk(opt)); |
280 | 277 | ||
281 | if (saddr) | 278 | if (saddr) |
282 | memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); | 279 | memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); |
283 | else | 280 | else |
284 | af->get_saddr(opt, transport, &fl); | 281 | af->get_saddr(opt, transport, &transport->fl); |
285 | 282 | ||
286 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { | 283 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { |
287 | return; | 284 | return; |