Re: How to debug "Malformed Packet (Exception occurred)" when send a udp packet?

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

 



On 2014-09-07 17:12:33 (+0800), lx <lxlenovostar@xxxxxxxxx> wrote:
>       I want to send a udp packet in kernel module. the codes is:
Why?

> // iph->version = 4; iph->ihl = 5;
> put_unaligned(0x45, (unsigned char *)send_iph);
> send_iph->tos      = 0;
> put_unaligned(htons(iph_len), &(send_iph->tot_len));
                ^- That's probably your problem.

Regards,
Kristof

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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