From e2be513380ebd46295e5744eaf0f3d63b9341eb5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 4 Jan 2024 12:09:05 +0000 Subject: [PATCH] ANDROID: GKI: fix crc issue in include/net/addrconf.h In commit 9354e0acdb74 ("net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX") a union is added to fix some issues, but that messes with the crc of a number of networking symbols for obvious reasons. As this does not actually change the abi at all, use some GENKSYMS magic #define logic to preserve the crc so that all is well. Bug: 161946584 Fixes: 9354e0acdb74 ("net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX") Change-Id: I9d2df74e8f3ae60425534f1b33d50b2bc444f7f5 Signed-off-by: Greg Kroah-Hartman --- include/net/addrconf.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 6b8eb652b0de..b24af9d46f02 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -31,9 +31,15 @@ struct prefix_info { __u8 length; __u8 prefix_len; +/* + * ANDROID: crc fix for commit 9354e0acdb74 ("net: ipv6: support + * reporting otherwise unknown prefix * flags in RTM_NEWPREFIX") + */ +#ifndef __GENKSYMS__ union __packed { __u8 flags; struct __packed { +#endif #if defined(__BIG_ENDIAN_BITFIELD) __u8 onlink : 1, autoconf : 1, @@ -45,8 +51,10 @@ struct prefix_info { #else #error "Please fix " #endif +#ifndef __GENKSYMS__ }; }; +#endif __be32 valid; __be32 prefered; __be32 reserved2;