aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-02-26 15:43:10 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-02-27 21:54:26 +0700
commit921b6a274c8ca975a23a1787739dbd3990b3435a (patch)
treec2d533630b9543f0f4cc533a3641af9139d5a8a9
parentbc583d9763a6889a754fd5b5d77345619e7d0d8e (diff)
lib/icmpv6.h: fix struct icmpv6_{radv_hdr,opt_prefix}
Fix wrong field order in the big-endian variants. Change-Id: Ifaa63bb5496e056805bd13b964c8b430fb11c24c (cherry picked from commit 99afe979efec7bf3bd0dbd2da2c00df71e5f474d)
-rw-r--r--lib/icmpv6.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/icmpv6.h b/lib/icmpv6.h
index 4b4dc37..ee5ef29 100644
--- a/lib/icmpv6.h
+++ b/lib/icmpv6.h
@@ -44,10 +44,9 @@ struct icmpv6_radv_hdr {
uint8_t res:6,
m:1,
o:1;
-#else
- uint8_t m:1,
- o:1,
- res:6;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
+ uint8_t o:1, m:1, res:6;
#endif
uint16_t router_lifetime;
uint32_t reachable_time;
@@ -72,10 +71,9 @@ struct icmpv6_opt_prefix {
uint8_t res:6,
a:1,
l:1;
-#else
- uint8_t l:1,
- a:1,
- res:6;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
+ uint8_t l:1, a:1, res:6;
#endif
uint32_t valid_lifetime;
uint32_t preferred_lifetime;