diff options
| author | Qiuwen Lu <[email protected]> | 2020-06-17 19:24:12 +0800 |
|---|---|---|
| committer | Qiuwen Lu <[email protected]> | 2020-06-17 19:24:12 +0800 |
| commit | 17fc38b422094b93c870ebfe6c223bc9780cb502 (patch) | |
| tree | 6155838605b34aedc9c4b1aaeebd10e7aa5e21fb | |
| parent | 84e98ad78bf64042dba3a16f08acc7438807432c (diff) | |
修正按虚拟链路号发包时没有调用Mbuf构造方法导致VLAN没有填写的问题。v4.3.24-20200619v4.3.23-20200617
| -rw-r--r-- | tunnat/src/runtime.cc | 2 | ||||
| -rw-r--r-- | tunnat/src/session.cc | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tunnat/src/runtime.cc b/tunnat/src/runtime.cc index d91c773..cb0c7ae 100644 --- a/tunnat/src/runtime.cc +++ b/tunnat/src/runtime.cc @@ -565,6 +565,8 @@ static int __virt_to_phy_pkt_virtual_link_id(TunnatInstance * instance, TunnatTh for (int i = tun_array->sz_array - 2; i >= 0; i--) { TunnelContainer & __tun_container = tun_array->tun_array[i]; + __tun_container.MbufMetaConstruct(mbuf); + auto __this_tun_length = static_cast<uint16_t>(__tun_container.ThisTunLength()); const char * pkt_ptr = marsio_buff_prepend(mbuf, __this_tun_length); diff --git a/tunnat/src/session.cc b/tunnat/src/session.cc index 3047735..8274e93 100644 --- a/tunnat/src/session.cc +++ b/tunnat/src/session.cc @@ -305,6 +305,7 @@ int LinkInfoTable::AddTunnel(const TunnelContainerArray &tun_array, tunnat_link_ throw std::runtime_error("Failed at adding entry to LinkInfoIndexTable, ret = " + std::to_string(ret)); } + tun_id = tb_entry->link_id; return 0; } |
