]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
patch by Sylvain Rochet: fixed bug #36283 (PPP struct used on header size computation...
authorgoldsimon <goldsimon@gmx.de>
Thu, 3 May 2012 18:39:43 +0000 (20:39 +0200)
committergoldsimon <goldsimon@gmx.de>
Thu, 3 May 2012 18:39:43 +0000 (20:39 +0200)
CHANGELOG
src/netif/ppp/ppp.c

index 404798ca009950cf81e1d40d3d3834e3837deffa..18e33041dc99a40fe0942f3b3ac1a5789738640c 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -80,6 +80,10 @@ HISTORY
 
  ++ Bugfixes:
 
+  2012-05-03: Simon Goldschmidt (patch by )
+  * ppp.c: fixed bug #36283 (PPP struct used on header size computation and
+    not packed)
+
   2012-05-03: Simon Goldschmidt (patch by David Empson)
   * ppp.c: fixed bug #36388 (PPP: checksum-only in last pbuf leads to pbuf with
     zero length)
index d880310e8737612fa78bd7b46367f4634ad2cd8e..2a3465756f9fb3cc1caea19b6e64f1e558d0a44d 100644 (file)
@@ -1586,10 +1586,21 @@ pppSingleBuf(struct pbuf *p)
   return q;
 }
 
+/** Input helper struct, must be packed since it is stored to pbuf->payload,
+ * which might be unaligned.
+ */
+#ifdef PACK_STRUCT_USE_INCLUDES
+#  include "arch/bpstruct.h"
+#endif
+PACK_STRUCT_BEGIN
 struct pppInputHeader {
-  int unit;
-  u16_t proto;
-};
+  PACK_STRUCT_FIELD(int unit);
+  PACK_STRUCT_FIELD(u16_t proto);
+} PACK_STRUCT_STRUCT;
+PACK_STRUCT_END
+#ifdef PACK_STRUCT_USE_INCLUDES
+#  include "arch/epstruct.h"
+#endif
 
 /*
  * Pass the processed input packet to the appropriate handler.