From: Nick Jones <redacted>
Date: Fri, 09 Mar 2012 00:10:29 +0800
However, seeing a kmalloc done for such a transient, sparse
structure didn't sit so well in the stomach. If we can be sure that
the metrics of a dst for an icmp6 packet won't be written to, we
could use the static const ip6_template_metrics array defined in
route.c:~205, it has RTAX_HOPLIMIT fixed at 255, and using it avoids
a kmalloc.
I'll produce another patch for this strategy if you think this is a
better idea.
This could work, but you'll need to add an assertion or similar to make
sure this requirement always holds.