summaryrefslogtreecommitdiff
path: root/tunnat/include
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2019-10-11 00:13:42 +0800
committerQiuwen Lu <[email protected]>2019-10-11 00:13:42 +0800
commit7b8ad9ec419ff36038f5af4cf7b9f7e047c0d7cb (patch)
treef5b176b477a8d29352fa719cdc815e38459b0e4e /tunnat/include
parentc90fdc817337a6086e4889bfe61a49982f018245 (diff)
修正在VLAN Flipping接入方式时填充控制域没有判断隧道边界导致的段错误。v4.3.15-20191011
Diffstat (limited to 'tunnat/include')
-rw-r--r--tunnat/include/tunnel.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tunnat/include/tunnel.h b/tunnat/include/tunnel.h
index 937c173..086dc78 100644
--- a/tunnat/include/tunnel.h
+++ b/tunnat/include/tunnel.h
@@ -437,11 +437,12 @@ struct TunnelContainerArray
TunnelContainer * GetTunContainerWithType(enum tunnel_type type)
{
- for (auto & tun_container : tun_array)
+ for (unsigned int i = 0; i < sz_array; i++)
{
+ auto & tun_container = tun_array[i];
if (tun_container.ThisTunType() == type) return &tun_container;
}
-
+
return nullptr;
}