uapi: fix big endian definition of ipv6_rpl_sr_hdr
authorJustin Iurman <justin.iurman@uliege.be>
Thu, 21 Jan 2021 22:00:44 +0000 (23:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:43 +0000 (23:28 +0100)
commitc48f69093e5e36201ca3a3178e591d0f02ae54de
treef9dba417684bc2628e9dd4b6f0a1e82857cc44c0
parent921f48afdd3a7a3178c7a26fcb080277443a93cf
uapi: fix big endian definition of ipv6_rpl_sr_hdr

commit 07d46d93c9acdfe0614071d73c415dd5f745cc6e upstream.

Following RFC 6554 [1], the current order of fields is wrong for big
endian definition. Indeed, here is how the header looks like:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Next Header  |  Hdr Ext Len  | Routing Type  | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| CmprI | CmprE |  Pad  |               Reserved                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This patch reorders fields so that big endian definition is now correct.

  [1] https://tools.ietf.org/html/rfc6554#section-3

Fixes: cfa933d938d8 ("include: uapi: linux: add rpl sr header definition")
Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/rpl.h