Thread (8 messages) 8 messages, 3 authors, 2012-03-20

Re: [PATCH net-next v3] ipv6: Allocate unique metrics for icmp6 packets to prevent tainting dst metrics

From: Eric Dumazet <hidden>
Date: 2012-03-17 16:36:45

On Sat, 2012-03-17 at 23:47 +0800, Nick Jones wrote:
The generation of an icmp6 packet, targeted to a specific desination
address, will cause the shared metrics of the ip6_dst and inetpeer
of that address to be tainted with the hoplimit value 255.
All packets, icmp6 or otherwise, will have this hoplimit value, and
if the destination is a router, not even advertisements specifying a
new hoplimit value will have any effect due to the way
ip6_dst_hoplimit works.

By allocating a unique metrics array for the icmp6 packet, the shared
metrics will not be tainted.  A ip6_dst flag is added to indicate that
the metrics for the dst don't belong to the peer, thus are not unique
and should be freed when the dst is freed.

Signed-off-by: Nick Jones <redacted>
---
+	}
+	dst_init_metrics(&rt->dst, metrics, 0);
Dont be fooled by 8e2ec639 precedent, third argument is a bool, so
please use 'false' instead of 0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help