bugfix: 修复了通过cmsg获取IP归属地的问题

This commit is contained in:
fengweihao
2024-04-03 16:50:54 +08:00
committed by luwenpeng
parent 8a2dcfcb31
commit 641c14f55a
7 changed files with 23 additions and 75 deletions

View File

@@ -283,7 +283,7 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
hit_cnt += scan_ret;
}
scan_ret = tfe_scan_ip_asn(stream, result, ctx->scan_mid, hit_cnt, g_doh_conf->local_logger, &(ctx->asn_server), &(ctx->asn_client));
scan_ret = tfe_scan_ip_asn(stream, result, ctx->scan_mid, hit_cnt, g_doh_conf->local_logger);
if (scan_ret > 0)
{
hit_cnt += scan_ret;
@@ -484,30 +484,7 @@ static void doh_ctx_free(struct doh_ctx *ctx)
evbuffer_free(ctx->http_req_body);
ctx->http_req_body = NULL;
}
if (ctx->asn_client)
{
free(ctx->asn_client);
ctx->asn_client = NULL;
}
if (ctx->asn_server)
{
free(ctx->asn_server);
ctx->asn_server = NULL;
}
if (ctx->location_client)
{
free(ctx->location_client);
ctx->location_client = NULL;
}
if (ctx->location_server)
{
free(ctx->location_server);
ctx->location_server = NULL;
}
FREE(&ctx);
}