]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Mar 2021 12:19:13 +0000 (13:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Mar 2021 12:19:13 +0000 (13:19 +0100)
added patches:
icmp-allow-icmpv6_ndo_send-to-work-with-config_ipv6-n.patch

queue-5.4/icmp-allow-icmpv6_ndo_send-to-work-with-config_ipv6-n.patch [new file with mode: 0644]
queue-5.4/net-icmp-pass-zeroed-opts-from-icmp-v6-_ndo_send-before-sending.patch
queue-5.4/series

diff --git a/queue-5.4/icmp-allow-icmpv6_ndo_send-to-work-with-config_ipv6-n.patch b/queue-5.4/icmp-allow-icmpv6_ndo_send-to-work-with-config_ipv6-n.patch
new file mode 100644 (file)
index 0000000..c1bbb3c
--- /dev/null
@@ -0,0 +1,58 @@
+From a8e41f6033a0c5633d55d6e35993c9e2005d872f Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Tue, 25 Feb 2020 18:05:35 +0800
+Subject: icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n
+
+From: Jason A. Donenfeld <Jason@zx2c4.com>
+
+commit a8e41f6033a0c5633d55d6e35993c9e2005d872f upstream.
+
+The icmpv6_send function has long had a static inline implementation
+with an empty body for CONFIG_IPV6=n, so that code calling it doesn't
+need to be ifdef'd. The new icmpv6_ndo_send function, which is intended
+for drivers as a drop-in replacement with an identical function
+signature, should follow the same pattern. Without this patch, drivers
+that used to work with CONFIG_IPV6=n now result in a linker error.
+
+Cc: Chen Zhou <chenzhou10@huawei.com>
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Fixes: 0b41713b6066 ("icmp: introduce helper for nat'd source address in network device context")
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/icmpv6.h |   16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/include/linux/icmpv6.h
++++ b/include/linux/icmpv6.h
+@@ -22,19 +22,23 @@ extern int inet6_unregister_icmp_sender(
+ int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type,
+                              unsigned int data_len);
++#if IS_ENABLED(CONFIG_NF_NAT)
++void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info);
++#else
++#define icmpv6_ndo_send icmpv6_send
++#endif
++
+ #else
+ static inline void icmpv6_send(struct sk_buff *skb,
+                              u8 type, u8 code, __u32 info)
+ {
+-
+ }
+-#endif
+-#if IS_ENABLED(CONFIG_NF_NAT)
+-void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info);
+-#else
+-#define icmpv6_ndo_send icmpv6_send
++static inline void icmpv6_ndo_send(struct sk_buff *skb,
++                                 u8 type, u8 code, __u32 info)
++{
++}
+ #endif
+ extern int                            icmpv6_init(void);
index f26c4a35ed059a0873c9c0e663deb1c5faf9f2e7..63379c15747e448f4782b7929303a0e880e88786 100644 (file)
@@ -131,7 +131,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  static inline int inet6_register_icmp_sender(ip6_icmp_send_t *fn)
  {
-@@ -34,11 +38,17 @@ static inline int inet6_unregister_icmp_
+@@ -34,18 +38,28 @@ static inline int inet6_unregister_icmp_
        return 0;
  }
  #else
@@ -150,7 +150,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type,
                               unsigned int data_len);
  
-@@ -54,7 +64,11 @@ static inline void icmpv6_send(struct sk
  #if IS_ENABLED(CONFIG_NF_NAT)
  void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info);
  #else
@@ -162,7 +161,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +}
  #endif
  
- extern int                            icmpv6_init(void);
+ #else
 --- a/include/linux/ipv6.h
 +++ b/include/linux/ipv6.h
 @@ -83,7 +83,6 @@ struct ipv6_params {
index eeba6aace92e1743654e92780523cec5e9b524fb..12dc341157253e6c3bad0de16595129f4ef624b2 100644 (file)
@@ -327,6 +327,7 @@ dm-era-reinitialize-bitset-cache-before-digesting-a-new-writeset.patch
 dm-era-only-resize-metadata-in-preresume.patch
 drm-i915-reject-446-480mhz-hdmi-clock-on-glk.patch
 icmp-introduce-helper-for-nat-d-source-address-in-network-device-context.patch
+icmp-allow-icmpv6_ndo_send-to-work-with-config_ipv6-n.patch
 gtp-use-icmp_ndo_send-helper.patch
 sunvnet-use-icmp_ndo_send-helper.patch
 xfrm-interface-use-icmp_ndo_send-helper.patch