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-20 05:29:40

Le mardi 19 juillet 2011 à 11:59 -0700, David Miller a écrit :
From: Eric Dumazet <redacted>
Date: Tue, 19 Jul 2011 20:57:50 +0200
quoted
Le mardi 19 juillet 2011 à 20:20 +0200, Eric Dumazet a écrit :
quoted
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 ?
This is ok if it handles the case where ort's metrics point to
writable inetpeer memory.
OK but if ort's metrics are writeable we must perform the dst_copy_metrics()
and therefore fill rt6i_dst before ?

My first patch had an issue in rt6_alloc_cow(), line 710, where 
ipv6_addr_equal(&rt->rt6i_dst.addr, daddr) becomes always true.

I guess I can replace it by ipv6_addr_equal(&ort->rt6i_dst.addr, daddr)


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