Re: Resending IP packets within dev packet handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>     struct flowi flow = {
>         .nl_u = {
>             .ip4_u = {
>                 .saddr = iph->saddr,
>                 .daddr = iph->daddr,
>                 .tos = RT_TOS(iph->tos)
>             }
>         },
>         .proto = iph->protocol
>     };
>     struct rtable *rt;
>     ip_route_output_key(&rt, &flow);
>     o_skb->dst = &(rt->u.dst);
>
>     ip_finish_output(o_skb);
>
>     kfree_skb(o_skb); //try removing this ..

Hi
The ip_finish_output funx calls ip_finish_output2 which whether
succeeds or fails,  frees the skb, hence you shouldn't free it again.
I think that is what is causing the crash.

Hope this helps,
Vinay

>
>     return 0;
> }
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux