summaryrefslogtreecommitdiff
path: root/tunnat/include
diff options
context:
space:
mode:
authorLu Qiuwen <[email protected]>2018-11-21 19:20:19 +0800
committerLu Qiuwen <[email protected]>2018-11-21 19:52:22 +0800
commit1cfc044c43070c8a83cfc7de2334ac9219895513 (patch)
tree48908eb24927eb8f4345990234dc871d06de7efb /tunnat/include
parent5a3ad0aa42710b268ae8749409bbbe59d19d1f38 (diff)
增加非对称隧道自动创建的开关,修正部分情况下MPLS标签填写错误的问题v4.2.43-20181121
* 增加非对称隧道自动创建的开关,在S->C和C->S两侧隧道构成不一致时,不自动根据S->C创建C->S隧道信息; * 修正MPLS标签填写错误的问题,原实现在TunInnerEther对象复制时,复制了其中的指针,导致错误的内存写入,现修正。
Diffstat (limited to 'tunnat/include')
-rw-r--r--tunnat/include/tunnat.h6
-rw-r--r--tunnat/include/tunnel.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/tunnat/include/tunnat.h b/tunnat/include/tunnat.h
index ff07d43..2c8ab30 100644
--- a/tunnat/include/tunnat.h
+++ b/tunnat/include/tunnat.h
@@ -61,6 +61,10 @@ struct TunnatInstance
/* 线程运行句柄 */
TunnatThreadInstance * thread_instances[MR_SID_MAX];
+ /* 是否根据一个方向自动创建另一方向的Tunnel信息 */
+ bool is_auto_reserve_tunnel;
+ /* 是否向最近使用的隧道注入找不到隧道信息的包 */
+ bool is_use_recent_tunnel;
TunnatInstance();
~TunnatInstance() = default;
@@ -195,4 +199,4 @@ struct TunnatThreadInstance
SessionTable * ss_table;
TunnatThreadStat * th_stat;
TunnelContainerArray * tun_container_array;
-}; \ No newline at end of file
+};
diff --git a/tunnat/include/tunnel.h b/tunnat/include/tunnel.h
index 30b6c6d..221eb9d 100644
--- a/tunnat/include/tunnel.h
+++ b/tunnat/include/tunnel.h
@@ -166,7 +166,6 @@ protected:
constexpr static int SZ_ETHER_TUNNEL_STORAGE = 64;
struct ether_hdr ether_hdr_;
char ether_tunnel_on_stack_[SZ_ETHER_TUNNEL_STORAGE];
- char * ether_tunnel_;
size_t ether_tunnel_len_;
public: