net: Swap ver and type in pppoe_hdr
authorChangli Gao <xiaosuo@gmail.com>
Fri, 28 Jun 2013 16:15:51 +0000 (00:15 +0800)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:53:44 +0000 (07:53 +0200)
[ Upstream commit b1a5a34bd0b8767ea689e68f8ea513e9710b671e ]

Ver and type in pppoe_hdr should be swapped as defined by RFC2516
section-4.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/linux/if_pppox.h

index 90b5fae5d714ae71f0c51fddb5e9a621501092c9..1750054ac45811eb53f6ab412b30aa0f38add94f 100644 (file)
@@ -108,11 +108,11 @@ struct pppoe_tag {
 
 struct pppoe_hdr {
 #if defined(__LITTLE_ENDIAN_BITFIELD)
-       __u8 ver : 4;
        __u8 type : 4;
+       __u8 ver : 4;
 #elif defined(__BIG_ENDIAN_BITFIELD)
-       __u8 type : 4;
        __u8 ver : 4;
+       __u8 type : 4;
 #else
 #error "Please fix <asm/byteorder.h>"
 #endif