Thread (9 messages) flat view 9 messages, 2 authors, 2011-07-22

Re: [BUG] ipv6: all routes share same inetpeer

From: Eric Dumazet <hidden>
Date: 2011-07-19 18:57:55
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

Le mardi 19 juillet 2011 à 20:20 +0200, Eric Dumazet a écrit :
Le mardi 19 juillet 2011 à 10:37 -0700, David Miller a écrit :
quoted
From: Eric Dumazet <redacted>
Date: Tue, 19 Jul 2011 19:23:49 +0200
quoted
Maybe you can find the bug before me ?
I think when we add the route we cow the metrics almost immediately.
The daddr is, unfortunately, fully prefixed at that point.
Yes, we shall provide a second ip6_rt_copy() argument, with the
destination address.
Hmm, or maybe just change the dst_copy_metrics(&rt->dst, &ort->dst);
call done from ip6_rt_copy(), to avoid doing the COW if not really
needed ?
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ddef80f..5403cea 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1740,7 +1740,7 @@ static struct rt6_info * ip6_rt_copy(struct rt6_info *ort)
 		rt->dst.input = ort->dst.input;
 		rt->dst.output = ort->dst.output;
 
-		dst_copy_metrics(&rt->dst, &ort->dst);
+		rt->dst._metrics = ort->dst._metrics;
 		rt->dst.error = ort->dst.error;
 		rt->rt6i_idev = ort->rt6i_idev;
 		if (rt->rt6i_idev)


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help