summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Rose <gvrose8192@gmail.com>2020-11-12 15:10:39 -0800
committerIlya Maximets <i.maximets@ovn.org>2020-11-16 17:37:55 +0100
commit09576003196beb1b1348b8563e23f335e73e01a3 (patch)
treee7821650879e9699495a4e78962f9cfc7a4e7cef
parent11a31ac4cb6a1020414ead5852d4f4f6a4c6e381 (diff)
downloadopenvswitch-09576003196beb1b1348b8563e23f335e73e01a3.tar.gz
compat: Fix compile warning.
In ../compat/nf_conntrack_reasm.c nf_frags_cache_name is declared if OVS_NF_DEFRAG6_BACKPORT is defined. However, later in the patch it is only used if HAVE_INET_FRAGS_WITH_FRAGS_WORK is defined and HAVE_INET_FRAGS_RND is not defined. This will cause a compile warning about unused variables. Fix it up by using the same defines that enable its use to decide if it should be declared and avoid the compiler warning. Fixes: 4a90b277baca ("compat: Fixup ipv6 fragmentation on 4.9.135+ kernels") Signed-off-by: Greg Rose <gvrose8192@gmail.com> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--datapath/linux/compat/nf_conntrack_reasm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/datapath/linux/compat/nf_conntrack_reasm.c b/datapath/linux/compat/nf_conntrack_reasm.c
index 9d77d9827..715388d83 100644
--- a/datapath/linux/compat/nf_conntrack_reasm.c
+++ b/datapath/linux/compat/nf_conntrack_reasm.c
@@ -56,10 +56,13 @@
#include <net/netns/generic.h>
#include "datapath.h"
-#ifdef OVS_NF_DEFRAG6_BACKPORT
+#if defined(HAVE_INET_FRAGS_WITH_FRAGS_WORK) || !defined(HAVE_INET_FRAGS_RND)
static const char nf_frags_cache_name[] = "ovs-frag6";
+#endif
+
+#ifdef OVS_NF_DEFRAG6_BACKPORT
struct nf_ct_frag6_skb_cb
{
struct inet6_skb_parm h;