From 37d3df60cb6a10295b062a393b9100bedfd589ca Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 4 Dec 2022 12:09:47 +0000 Subject: [PATCH] ANDROID: CRC ABI fixups in ip.h and ipv6.h In commit 6e9334436d78 ("net: use struct_group to copy ip/ipv6 header addresses"), struct_group() is added to some structures to resolve a build warning. This changes the CRC of a number of networking functions, without changing any actual structure sizes or interactions. To resolve this, use __GENKSYMS__ #ifdef hack to preserve the Android kernel CRC abi. Bug: 161946584 Fixes: 6e9334436d78 ("net: use struct_group to copy ip/ipv6 header addresses") Signed-off-by: Greg Kroah-Hartman Change-Id: Ia70eb3aa41316fbced713c99c85ddaeccec2ffec --- include/uapi/linux/ip.h | 4 ++++ include/uapi/linux/ipv6.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h index d2f143393780..64beb32a2102 100644 --- a/include/uapi/linux/ip.h +++ b/include/uapi/linux/ip.h @@ -100,10 +100,14 @@ struct iphdr { __u8 ttl; __u8 protocol; __sum16 check; +#ifndef __GENKSYMS__ __struct_group(/* no tag */, addrs, /* no attrs */, +#endif __be32 saddr; __be32 daddr; +#ifndef __GENKSYMS__ ); +#endif /*The options start here. */ }; diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h index 766ab5c8ee65..bfe9542953af 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h @@ -130,10 +130,14 @@ struct ipv6hdr { __u8 nexthdr; __u8 hop_limit; +#ifndef __GENKSYMS__ __struct_group(/* no tag */, addrs, /* no attrs */, +#endif struct in6_addr saddr; struct in6_addr daddr; +#ifndef __GENKSYMS__ ); +#endif };