mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
fixed bug #24517: IP reassembly crashes on unaligned IP headers by packing the struct ip_reass_helper.
This commit is contained in:
parent
06df1647e1
commit
13a139eef7
@ -51,6 +51,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2008-10-15 Simon Goldschmidt
|
||||||
|
* ip_frag.c: fixed bug #24517: IP reassembly crashes on unaligned IP headers
|
||||||
|
by packing the struct ip_reass_helper.
|
||||||
|
|
||||||
2008-10-03 David Woodhouse, Jonathan Larmour
|
2008-10-03 David Woodhouse, Jonathan Larmour
|
||||||
* etharp.c (etharp_arp_input): Fix type aliasing problem copying ip address.
|
* etharp.c (etharp_arp_input): Fix type aliasing problem copying ip address.
|
||||||
|
|
||||||
|
@ -81,12 +81,21 @@
|
|||||||
/** This is a helper struct which holds the starting
|
/** This is a helper struct which holds the starting
|
||||||
* offset and the ending offset of this fragment to
|
* offset and the ending offset of this fragment to
|
||||||
* easily chain the fragments.
|
* easily chain the fragments.
|
||||||
|
* It has to be packed since it has to fit inside the IP header.
|
||||||
*/
|
*/
|
||||||
|
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||||
|
# include "arch/bpstruct.h"
|
||||||
|
#endif
|
||||||
|
PACK_STRUCT_BEGIN
|
||||||
struct ip_reass_helper {
|
struct ip_reass_helper {
|
||||||
struct pbuf *next_pbuf;
|
PACK_STRUCT_FIELD(struct pbuf *next_pbuf);
|
||||||
u16_t start;
|
PACK_STRUCT_FIELD(u16_t start);
|
||||||
u16_t end;
|
PACK_STRUCT_FIELD(u16_t end);
|
||||||
};
|
} PACK_STRUCT_STRUCT;
|
||||||
|
PACK_STRUCT_END
|
||||||
|
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||||
|
# include "arch/epstruct.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB) \
|
#define IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB) \
|
||||||
(ip_addr_cmp(&(iphdrA)->src, &(iphdrB)->src) && \
|
(ip_addr_cmp(&(iphdrA)->src, &(iphdrB)->src) && \
|
||||||
|
Loading…
Reference in New Issue
Block a user