Issue
I have net_device
which has the ndo_start_xmit
function implemented.
When the ndo_start_xmit
function is called I have an skb
that contains the IP packet. I'll need to overt the packet with IP+UDP
headers and send it back to the routing system.
The problem is that, when I call the dst_input(skb)
or dst_output(skb)
, I'll catch the NULL
pointer dereference error. It seems that I can't use this functions to push the encapsulated packet into the network stack.
What is the solution?
Solution
If you want to push an skb into the kernel stack, just use the netif_rx(skb) function.
Answered By - user2699113 Answer Checked By - David Marino (WPSolving Volunteer)