diff options
| author | liuxueli <[email protected]> | 2020-06-12 11:52:35 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2020-06-12 11:52:35 +0800 |
| commit | 2aa222c7cf42679674febd1b7a86afc39bbc0105 (patch) | |
| tree | f6dd3290c607ba4ce4a6fe4587bd9326cc9cfb36 | |
| parent | cf3ec4e15c4f33ce8d5d92db132e057633dc5d32 (diff) | |
IPv6目的IP转换时,使用错误变量会导致获取的IP归属地信息不正确v1.2.8.20.06
| -rw-r--r-- | src/tsg_entry.cpp | 2 | ||||
| -rw-r--r-- | src/tsg_rule.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index b92da1b..3ee9402 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -42,7 +42,7 @@ static __attribute__((__used__)) const char * GIT_VERSION_UNKNOWN = NULL; #endif -char TSG_MASTER_VERSION_20200609=0; +char TSG_MASTER_VERSION_20200612=0; const char *tsg_conffile="tsgconf/main.conf"; g_tsg_para_t g_tsg_para; diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index c346eb6..6f0e25a 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -672,7 +672,7 @@ int tsg_get_ip_asn(const struct streaminfo *a_stream, int table_id, MAAT_PLUGIN_ memcpy((char *)(source_ip.ipv6), a_stream->addr.tuple4_v6->saddr, IPV6_ADDR_LEN); dest_ip.ip_type=6; - memcpy((char *)(source_ip.ipv6), a_stream->addr.tuple4_v6->daddr, IPV6_ADDR_LEN); + memcpy((char *)(dest_ip.ipv6), a_stream->addr.tuple4_v6->daddr, IPV6_ADDR_LEN); break; default: return 0; @@ -711,7 +711,7 @@ int tsg_get_ip_location(const struct streaminfo *a_stream, int table_id, MAAT_PL memcpy((char *)(source_ip.ipv6), a_stream->addr.tuple4_v6->saddr, IPV6_ADDR_LEN); dest_ip.ip_type=6; - memcpy((char *)(source_ip.ipv6), a_stream->addr.tuple4_v6->daddr, IPV6_ADDR_LEN); + memcpy((char *)(dest_ip.ipv6), a_stream->addr.tuple4_v6->daddr, IPV6_ADDR_LEN); break; default: return 0; |
