net: Swap ver and type in pppoe_hdr
Subsystems (2)
PATCH 1/1 net: Swap ver and type in pppoe_hdr
Ver and type in pppoe_hdr should be swapped as defined by RFC2516 section-4.
--- include/uapi/linux/if_pppox.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/if_pppox.h +2 -2
@@ -135,11 +135,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
Signature · 1 line
1.7.9.5
From: Changli Gao <[email protected]>
Date: Sat, 29 Jun 2013 00:15:51 +0800
Quoted 2 lines
Ver and type in
pppoe_hdrshould be swapped as defined by RFC2516 section-4.
I can't believe this has been wrong for more than 8 years.
But, of course, it is possible. Especially since we never check these 'ver' and 'type' fields on packet input, and we always set them both to the same value ('1') on output.
Applied, thanks.