summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-07-31 14:49:52 +0800
committerSteffen Klassert <steffen.klassert@secunet.com>2020-08-08 08:17:22 +0200
commit61ee4137b5744d9c555cd4674aae353a45f9cd2e (patch)
tree8b808c441a1da10dc249be6b6a1d052ca16ed8e6
parent1c3b63f155f637594268cd1add8335461691b314 (diff)
ip_vti: Fix unused variable warning
If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n, net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-rw-r--r--net/ipv4/ip_vti.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 49daaed89764..f687abb069fa 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -490,6 +490,7 @@ static struct xfrm_tunnel vti_ipip_handler __read_mostly = {
.priority = 0,
};
+#if IS_ENABLED(CONFIG_IPV6)
static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
.handler = vti_rcv_tunnel,
.cb_handler = vti_rcv_cb,
@@ -497,6 +498,7 @@ static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
.priority = 0,
};
#endif
+#endif
static int __net_init vti_init_net(struct net *net)
{