lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #7264] protocols are rejected incorrectly on big end


From: Greg Renda
Subject: [lwip-devel] [patch #7264] protocols are rejected incorrectly on big endian architectures
Date: Fri, 30 Jul 2010 23:27:03 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

URL:
  <http://savannah.nongnu.org/patch/?7264>

                 Summary: protocols are rejected incorrectly on big endian
architectures
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: greg
            Submitted on: Fri 30 Jul 2010 11:27:02 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

An unrecognized protocol isn't rejected properly when BYTE_ORDER !=
LITTLE_ENDIAN.  The protocol id isn't copied into the output buffer.

--- ppp.c.orig  2010-07-30 16:24:12.000000000 -0700
+++ ppp.c       2010-07-30 16:24:28.000000000 -0700
@@ -1704,8 +1704,8 @@
       }
 #if BYTE_ORDER == LITTLE_ENDIAN
       protocol = htons(protocol);
-      SMEMCPY(nb->payload, &protocol, sizeof(protocol));
 #endif /* BYTE_ORDER == LITTLE_ENDIAN */
+      SMEMCPY(nb->payload, &protocol, sizeof(protocol));
       lcp_sprotrej(pd, nb->payload, nb->len);
     }
     break;





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7264>

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




reply via email to

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