[Top][All Lists]

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

[lwip-devel] [bug #49292] IP_HLEN seems to be incorrect in ip4.h

From: Michael Bechard
Subject: [lwip-devel] [bug #49292] IP_HLEN seems to be incorrect in ip4.h
Date: Fri, 7 Oct 2016 14:32:59 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36


                 Summary: IP_HLEN seems to be incorrect in ip4.h
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: mtbowler416
            Submitted on: Fri 07 Oct 2016 02:32:57 PM GMT
                Category: IPv4
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head



In file src/include/lwip/prot/ip4.h, IP_HLEN is defined as 20, and the comment
right above this line says it should be the same as "sizeof(struct ip_hdr)".
However, sizeof(struct ip_hdr) returns 28, which is also the value I get when
counting up the bytes in the ip_hdr definition.

I noticed this when using a udp packet for TFTP, and realized the udp_hdr
destination port was being overwritten. Changing the length to 28 fixes this.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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