lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #43081] The crash error for the active LWIP_NETBUF_REC


From: Joel Cunningham
Subject: [lwip-devel] [bug #43081] The crash error for the active LWIP_NETBUF_RECVINFO option in api_msg.c (lwip-1.4.1)
Date: Tue, 26 Aug 2014 19:40:38 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36

Follow-up Comment #1, bug #43081 (project lwip):

I've come across the same behavior and I think the fix is slightly different:

IPH_LEN is the total number of bytes of the IP header + payload.  This would
be the entire IP packet (including the datagram).  To get the length (in
bytes) of the IP header, we need IPH_HL * 4

So it should be

const struct udp_hdr* udphdr = (void*)(((char*)iphdr) + (IPH_HL(iphdr) * 4));

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?43081>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]