diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index 0be0d68fbb00..1121a623516c 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h @@ -44,10 +44,7 @@ extern int inet6_register_icmp_sender(ip6_icmp_send_t *fn); extern int inet6_unregister_icmp_sender(ip6_icmp_send_t *fn); #endif -static inline void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) -{ - __icmpv6_send(skb, type, code, info, IP6CB(skb)); -} +void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info); int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type, unsigned int data_len); diff --git a/net/ipv6/ip6_icmp.c b/net/ipv6/ip6_icmp.c index 9e3574880cb0..d779716f508b 100644 --- a/net/ipv6/ip6_icmp.c +++ b/net/ipv6/ip6_icmp.c @@ -47,6 +47,18 @@ void __icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, EXPORT_SYMBOL(__icmpv6_send); #endif +/* + * ANDROID API HACK for android11-5.4 branch only + * + * Work around loss of icmpv6_send global symbol that got moved to __icmpv6_send + * in 5.4.102 + */ +void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) +{ + __icmpv6_send(skb, type, code, info, IP6CB(skb)); +} +EXPORT_SYMBOL(icmpv6_send); + #if IS_ENABLED(CONFIG_NF_NAT) #include void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info)