sctp: check cached dst before using it
dst_check() will take care of SA (and obsolete field), hence IPsec rekeying scenario is taken into account. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vlad Yaseivch <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c57b546840
commit
e0268868ba
@@ -704,4 +704,17 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr)
|
||||
addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff);
|
||||
}
|
||||
|
||||
/* The cookie is always 0 since this is how it's used in the
|
||||
* pmtu code.
|
||||
*/
|
||||
static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t)
|
||||
{
|
||||
if (t->dst && !dst_check(t->dst, 0)) {
|
||||
dst_release(t->dst);
|
||||
t->dst = NULL;
|
||||
}
|
||||
|
||||
return t->dst;
|
||||
}
|
||||
|
||||
#endif /* __net_sctp_h__ */
|
||||
|
Reference in New Issue
Block a user