Skip to content

Commit

Permalink
compat: Fix compile warning.
Browse files Browse the repository at this point in the history
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: 4a90b27 ("compat: Fixup ipv6 fragmentation on 4.9.135+ kernels")
Signed-off-by: Greg Rose <[email protected]>
Acked-by: Yi-Hung Wei <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
gvrose8192 authored and igsilya committed Nov 16, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f365b41 commit 42da9cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datapath/linux/compat/nf_conntrack_reasm.c
Original file line number Diff line number Diff line change
@@ -57,10 +57,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;

0 comments on commit 42da9cb

Please sign in to comment.