* [PATCH] net: Swap ver and type in pppoe_hdr
@ 2013-06-28 16:15 Changli Gao
2013-07-02 1:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2013-06-28 16:15 UTC (permalink / raw)
To: David S. Miller; +Cc: Changli Gao, netdev
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(-)
diff --git a/include/uapi/linux/if_pppox.h b/include/uapi/linux/if_pppox.h
index 0b46fd5..e36a4ae 100644
--- a/include/uapi/linux/if_pppox.h
+++ b/include/uapi/linux/if_pppox.h
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: Swap ver and type in pppoe_hdr
2013-06-28 16:15 [PATCH] net: Swap ver and type in pppoe_hdr Changli Gao
@ 2013-07-02 1:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-07-02 1:20 UTC (permalink / raw)
To: xiaosuo; +Cc: netdev
From: Changli Gao <xiaosuo@gmail.com>
Date: Sat, 29 Jun 2013 00:15:51 +0800
> Ver and type in pppoe_hdr should 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-02 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28 16:15 [PATCH] net: Swap ver and type in pppoe_hdr Changli Gao
2013-07-02 1:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).