IPv6目的IP转换时,使用错误变量会导致获取的IP归属地信息不正确
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user