From daa2edebe71d794284142696397bfce6fd45f926 Mon Sep 17 00:00:00 2001
From: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
Date: Fri, 8 Jun 2018 15:45:42 +1200
Subject: [PATCH 56/76] ipvti: Fix wrong array size initialization

IPv4 VTI tunnels use the VTI defines.

Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>

Fixes: 8f6301426a00d992d00238c7ddd666e96aa63e28
---
 lib/route/link/ipvti.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/route/link/ipvti.c b/lib/route/link/ipvti.c
index 0fa80ea..851d566 100644
--- a/lib/route/link/ipvti.c
+++ b/lib/route/link/ipvti.c
@@ -48,7 +48,7 @@ struct ipvti_info
 	uint32_t   ipvti_mask;
 };
 
-static	struct nla_policy ipvti_policy[IFLA_GRE_MAX + 1] = {
+static	struct nla_policy ipvti_policy[IFLA_VTI_MAX + 1] = {
 	[IFLA_VTI_LINK]     = { .type = NLA_U32 },
 	[IFLA_VTI_IKEY]     = { .type = NLA_U32 },
 	[IFLA_VTI_OKEY]     = { .type = NLA_U32 },
@@ -76,13 +76,13 @@ static int ipvti_alloc(struct rtnl_link *link)
 static int ipvti_parse(struct rtnl_link *link, struct nlattr *data,
 		       struct nlattr *xstats)
 {
-	struct nlattr *tb[IFLA_IPTUN_MAX + 1];
+	struct nlattr *tb[IFLA_VTI_MAX + 1];
 	struct ipvti_info *ipvti;
 	int err;
 
 	NL_DBG(3, "Parsing IPVTI link info\n");
 
-	err = nla_parse_nested(tb, IFLA_GRE_MAX, data, ipvti_policy);
+	err = nla_parse_nested(tb, IFLA_VTI_MAX, data, ipvti_policy);
 	if (err < 0)
 		goto errout;
 
-- 
1.8.3.1

