Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -6
+1
include/net/sctp/structs.h
··· 894 894 /* Is this structure kfree()able? */ 895 895 malloced:1; 896 896 897 + struct flowi fl; 897 898 898 899 /* This is the peer's IP address and port. */ 899 900 union sctp_addr ipaddr;
+3 -6
net/sctp/transport.c
··· 213 213 /* Initialize the pmtu of a transport. */ 214 214 void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk) 215 215 { 216 - struct flowi fl; 217 - 218 216 /* If we don't have a fresh route, look one up */ 219 217 if (!transport->dst || transport->dst->obsolete > 1) { 220 218 dst_release(transport->dst); 221 219 transport->af_specific->get_dst(transport, &transport->saddr, 222 - &fl, sk); 220 + &transport->fl, sk); 223 221 } 224 222 225 223 if (transport->dst) { ··· 272 274 { 273 275 struct sctp_association *asoc = transport->asoc; 274 276 struct sctp_af *af = transport->af_specific; 275 - struct flowi fl; 276 277 277 - af->get_dst(transport, saddr, &fl, sctp_opt2sk(opt)); 278 + af->get_dst(transport, saddr, &transport->fl, sctp_opt2sk(opt)); 278 279 279 280 if (saddr) 280 281 memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); 281 282 else 282 - af->get_saddr(opt, transport, &fl); 283 + af->get_saddr(opt, transport, &transport->fl); 283 284 284 285 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { 285 286 return;