ANDROID: GKI: fix crc issue in include/net/addrconf.h

In commit 97275e470c ("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: 97275e470c ("net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX")
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Change-Id: I9d2df74e8f3ae60425534f1b33d50b2bc444f7f5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2024-01-04 12:09:05 +00:00
parent 4a8f190c2a
commit 068af29e24

View File

@@ -31,9 +31,15 @@ struct prefix_info {
__u8 length; __u8 length;
__u8 prefix_len; __u8 prefix_len;
/*
* ANDROID: crc fix for commit 9354e0acdb74 ("net: ipv6: support
* reporting otherwise unknown prefix * flags in RTM_NEWPREFIX")
*/
#ifndef __GENKSYMS__
union __packed { union __packed {
__u8 flags; __u8 flags;
struct __packed { struct __packed {
#endif
#if defined(__BIG_ENDIAN_BITFIELD) #if defined(__BIG_ENDIAN_BITFIELD)
__u8 onlink : 1, __u8 onlink : 1,
autoconf : 1, autoconf : 1,
@@ -45,8 +51,10 @@ struct prefix_info {
#else #else
#error "Please fix <asm/byteorder.h>" #error "Please fix <asm/byteorder.h>"
#endif #endif
#ifndef __GENKSYMS__
}; };
}; };
#endif
__be32 valid; __be32 valid;
__be32 prefered; __be32 prefered;
__be32 reserved2; __be32 reserved2;