On Thu, Feb 20, 2014 at 05:30:23PM +0000, David Howells wrote:
David Miller [off-list ref] wrote:
quoted
quoted
One further question: If I want to get the MTU size of the NIC through
which packets will go to get to a particular peer, can I do:
As has been suggested or at least hinted to by others, you have to use
the route dst's device pointer.
So I gather. My query was intended to be about the safety of accessing the
dst->dev pointer. Can I just dereference it? Or do I need to take a lock or
use RCU?
No, you can just dereference it. dst holds a reference on ->dev, so it
is safe without lock or rcu as long as dst is alive and referenced.
Greetings,
Hannes