diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-11-02 16:36:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-01 09:17:16 +0100 |
commit | 465073e44fda4982af05fb2d518ef5ce99b1fbe6 (patch) | |
tree | f471db193f4f3eee015de5b06be033a34cd0a5f4 /net/openvswitch | |
parent | 31bced01fe77f5164201190bb488f09575000c1d (diff) | |
download | linux-stable-465073e44fda4982af05fb2d518ef5ce99b1fbe6.tar.gz linux-stable-465073e44fda4982af05fb2d518ef5ce99b1fbe6.tar.bz2 linux-stable-465073e44fda4982af05fb2d518ef5ce99b1fbe6.zip |
openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS
[ Upstream commit a277d516de5f498c91d91189717ef7e01102ad27 ]
When CONFIG_CC_OPTIMIZE_FOR_DEBUGGING is enabled, the compiler
fails to optimize out a dead code path, which leads to a link failure:
net/openvswitch/conntrack.o: In function `ovs_ct_set_labels':
conntrack.c:(.text+0x2e60): undefined reference to `nf_connlabels_replace'
In this configuration, we can take a shortcut, and completely
remove the contrack label code. This may also help the regular
optimization.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/conntrack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 35ae64cbef33..46aa1aa51db4 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1199,7 +1199,8 @@ static int ovs_ct_commit(struct net *net, struct sw_flow_key *key, &info->labels.mask); if (err) return err; - } else if (labels_nonzero(&info->labels.mask)) { + } else if (IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS) && + labels_nonzero(&info->labels.mask)) { err = ovs_ct_set_labels(ct, key, &info->labels.value, &info->labels.mask); if (err) |