summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2015-05-22 20:56:01 -0700
committerBen Hutchings <ben@decadent.org.uk>2017-11-11 13:33:28 +0000
commit3ebe28a44b3c0f7f06eb5bf7661ef452ea613c52 (patch)
tree67bdb0e29d63baaacdbeddce262e0f59cd2620c9 /net/sctp
parent71f1b6f16c3c2884ddb6c2a1fec277dd401cd39a (diff)
downloadlinux-stable-3ebe28a44b3c0f7f06eb5bf7661ef452ea613c52.tar.gz
linux-stable-3ebe28a44b3c0f7f06eb5bf7661ef452ea613c52.tar.bz2
linux-stable-3ebe28a44b3c0f7f06eb5bf7661ef452ea613c52.zip
ipv6: Add rt6_get_cookie() function
commit b197df4f0f3782782e9ea8996e91b65ae33e8dd9 upstream. Instead of doing the rt6->rt6i_node check whenever we need to get the route's cookie. Refactor it into rt6_get_cookie(). It is a prep work to handle FLOWI_FLAG_KNOWN_NH and also percpu rt6_info later. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Cc: Steffen Klassert <steffen.klassert@secunet.com> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/ipv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 8ad13ba731b9..7f47fbdeb414 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -331,7 +331,7 @@ out:
rt = (struct rt6_info *)dst;
t->dst = dst;
- t->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
+ t->dst_cookie = rt6_get_cookie(rt);
pr_debug("rt6_dst:%pI6 rt6_src:%pI6\n", &rt->rt6i_dst.addr,
&fl6->saddr);
} else {