netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] ipv6: copy lwtstate in ip6_rt_copy_init()
@ 2015-07-24 10:28 Nicolas Dichtel
  2015-07-24 10:28 ` [PATCH net-next 2/2] lwtunnel: change prototype of lwtunnel_state_get() Nicolas Dichtel
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nicolas Dichtel @ 2015-07-24 10:28 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nicolas Dichtel, Thomas Graf, Roopa Prabhu

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: 19e42e451506 ("ipv6: support for fib route lwtunnel encap attributes")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/ipv6/route.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 67b2367126f3..ac01ab0886a5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2164,6 +2164,10 @@ static void ip6_rt_copy_init(struct rt6_info *rt, struct rt6_info *ort)
 #endif
 	rt->rt6i_prefsrc = ort->rt6i_prefsrc;
 	rt->rt6i_table = ort->rt6i_table;
+	if (ort->rt6i_lwtstate) {
+		lwtunnel_state_get(ort->rt6i_lwtstate);
+		rt->rt6i_lwtstate = ort->rt6i_lwtstate;
+	}
 }
 
 #ifdef CONFIG_IPV6_ROUTE_INFO
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-27  8:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 10:28 [PATCH net-next 1/2] ipv6: copy lwtstate in ip6_rt_copy_init() Nicolas Dichtel
2015-07-24 10:28 ` [PATCH net-next 2/2] lwtunnel: change prototype of lwtunnel_state_get() Nicolas Dichtel
2015-07-24 10:41   ` Thomas Graf
2015-07-24 13:53   ` roopa
2015-07-27  8:03   ` David Miller
2015-07-24 10:40 ` [PATCH net-next 1/2] ipv6: copy lwtstate in ip6_rt_copy_init() Thomas Graf
2015-07-24 13:40 ` roopa
2015-07-27  8:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).