diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index cc50fbe..4081ffb 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -258,13 +258,14 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc, } dst = ip6_route_output(&init_net, NULL, &fl); - if (!dst->error) { - struct rt6_info *rt; - rt = (struct rt6_info *)dst; - SCTP_DEBUG_PRINTK("rt6_dst:%pI6 rt6_src:%pI6\n", - &rt->rt6i_dst.addr, &rt->rt6i_src.addr); - return dst; - } + if (!dst->error) + if (xfrm_lookup(&init_net, &dst, &fl, asoc ? asoc->base.sk : NULL, 0) >= 0) { + struct rt6_info *rt; + rt = (struct rt6_info *)dst; + SCTP_DEBUG_PRINTK("rt6_dst:%pI6 rt6_src:%pI6\n", + &rt->rt6i_dst.addr, &rt->rt6i_src.addr); + return dst; + } SCTP_DEBUG_PRINTK("NO ROUTE\n"); dst_release(dst); return NULL;