aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2011-04-26 17:51:31 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-27 16:14:04 -0400
commit9914ae3ca770389a3bec3114d0a07532a7f235dd (patch)
tree269120740aa1afdb0dd792284341aaee93024f28 /include
parent625034113bd45c71fb9e329f52f25fef9e6993a3 (diff)
sctp: cache the ipv6 source after route lookup
The ipv6 routing lookup does give us a source address, but instead of filling it into the dst, it's stored in the flowi. We can use that instead of going through the entire source address selection again. Also the useless ->dst_saddr member of sctp_pf is removed. And sctp_v6_dst_saddr() is removed, instead by introduce sctp_v6_to_addr(), which can be reused to cleanup some dup code. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/structs.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 5c9bada51d2d..1d465d62f34f 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -566,17 +566,15 @@ struct sctp_af {
566 int __user *optlen); 566 int __user *optlen);
567 struct dst_entry *(*get_dst) (struct sctp_association *asoc, 567 struct dst_entry *(*get_dst) (struct sctp_association *asoc,
568 union sctp_addr *daddr, 568 union sctp_addr *daddr,
569 union sctp_addr *saddr); 569 union sctp_addr *saddr,
570 struct flowi *fl,
571 struct sock *sk);
570 void (*get_saddr) (struct sctp_sock *sk, 572 void (*get_saddr) (struct sctp_sock *sk,
571 struct sctp_association *asoc, 573 struct sctp_transport *t,
572 struct dst_entry *dst,
573 union sctp_addr *daddr, 574 union sctp_addr *daddr,
574 union sctp_addr *saddr); 575 struct flowi *fl);
575 void (*copy_addrlist) (struct list_head *, 576 void (*copy_addrlist) (struct list_head *,
576 struct net_device *); 577 struct net_device *);
577 void (*dst_saddr) (union sctp_addr *saddr,
578 struct dst_entry *dst,
579 __be16 port);
580 int (*cmp_addr) (const union sctp_addr *addr1, 578 int (*cmp_addr) (const union sctp_addr *addr1,
581 const union sctp_addr *addr2); 579 const union sctp_addr *addr2);
582 void (*addr_copy) (union sctp_addr *dst, 580 void (*addr_copy) (union sctp_addr *dst,
@@ -1061,7 +1059,7 @@ void sctp_transport_set_owner(struct sctp_transport *,
1061 struct sctp_association *); 1059 struct sctp_association *);
1062void sctp_transport_route(struct sctp_transport *, union sctp_addr *, 1060void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
1063 struct sctp_sock *); 1061 struct sctp_sock *);
1064void sctp_transport_pmtu(struct sctp_transport *); 1062void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk);
1065void sctp_transport_free(struct sctp_transport *); 1063void sctp_transport_free(struct sctp_transport *);
1066void sctp_transport_reset_timers(struct sctp_transport *); 1064void sctp_transport_reset_timers(struct sctp_transport *);
1067void sctp_transport_hold(struct sctp_transport *); 1065void sctp_transport_hold(struct sctp_transport *);