Skip to content

Commit d943659

Browse files
NicolasDichteldavem330
authored andcommitted
ipv6: copy lwtstate in ip6_rt_copy_init()
We need to copy this field (ip6_rt_cache_alloc() and ip6_rt_pcpu_alloc() use ip6_rt_copy_init() to build a dst). CC: Thomas Graf <tgraf@suug.ch> CC: Roopa Prabhu <roopa@cumulusnetworks.com> Fixes: 19e42e4 ("ipv6: support for fib route lwtunnel encap attributes") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6673a9f commit d943659

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/ipv6/route.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,6 +2161,10 @@ static void ip6_rt_copy_init(struct rt6_info *rt, struct rt6_info *ort)
21612161
#endif
21622162
rt->rt6i_prefsrc = ort->rt6i_prefsrc;
21632163
rt->rt6i_table = ort->rt6i_table;
2164+
if (ort->rt6i_lwtstate) {
2165+
lwtunnel_state_get(ort->rt6i_lwtstate);
2166+
rt->rt6i_lwtstate = ort->rt6i_lwtstate;
2167+
}
21642168
}
21652169

21662170
#ifdef CONFIG_IPV6_ROUTE_INFO

0 commit comments

Comments
 (0)