I’m trying to write a virtual netdevice driver on linux kernel 3.3.2. Some features of my driver need the route info when transmitting packets, so I use function skb_dst(struct sk_buff *) to get the dst_entry pointer. But whatever I do, wherever I ping, whenever I try, skb_dst() always returns NULL. I don’t know why, and the bug confused me for more than a week. Can anyone help me?
I’m trying to write a virtual netdevice driver on linux kernel 3.3.2. Some features
Share
I’ve found the reason! It’s because of a flag added to kernel:
IFF_XMIT_DST_RELEASE, if a virtual device is allocated with the flag set to0, the kernel will drop the routing information when sending thesk_buffto the device. Thanks for Kristof Provost’s reply all the same and sorry for ending the question so late.