diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index 40f543e..7524f7b 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_20200605=0; +char TSG_MASTER_VERSION_20200608=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 82d92d5..c346eb6 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -55,6 +55,44 @@ const struct _str2index g_tsg_proto_string[PROTO_MAX+1]={{PROTO_UNKONWN, 0, (cha {PROTO_MAX, 0, (char *)""} }; +static char* str_unescape(char* s) +{ + int i=0,j=0; + int len=strlen(s); + for(i=0,j=0;iorganization); + atomic_inc(&asn->ref_cnt); asn->table_id=table_id; *ad=(MAAT_PLUGIN_EX_DATA)asn; @@ -215,6 +255,11 @@ void location_new_data(int table_id, const char* key, const char* table_line, MA ); return; } + + str_unescape(location->continent_full); + str_unescape(location->country_full); + str_unescape(location->province_full); + str_unescape(location->city_full); atomic_inc(&location->ref_cnt); location->table_id=table_id; @@ -804,7 +849,7 @@ int tsg_scan_ip_location(Maat_feather_t maat_feather, const struct streaminfo *a MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_DEBUG, "SCAN_IP_LOCATION", - "Hit IP_LOCATION: %s scan ret: %d table_name: %d policy_id: %d service: %d action: %d addr: %s", + "Hit IP_LOCATION: %s scan ret: %d table_name: %s policy_id: %d service: %d action: %d addr: %s", buff, ret, g_tsg_para.table_name[idx],