TFE优化解析控制报文,解决mpack只有proxy字段时,解析错误

This commit is contained in:
wangmenglan
2023-05-10 20:06:07 +08:00
parent 2a55a2be75
commit 935aa7235e
3 changed files with 4 additions and 10 deletions

View File

@@ -1045,12 +1045,6 @@ static void send_event_log(struct session_ctx *s_ctx, int thread_seq, void *ctx)
}
return;
}
struct ethhdr *eth_hdr = (struct ethhdr *)s_ctx->ctrl_meta->raw_data;
struct ip *ip_hdr = (struct ip *)((char *)eth_hdr + sizeof(struct ethhdr));
struct tcphdr *tcp_hdr = (struct tcphdr *)((char *)ip_hdr + sizeof(struct ip));
// ip_hdr->ip_len = htons(sizeof(struct ip) + (ntohs(tcp_hdr->th_off) * 4) + size);
ip_hdr->ip_len = htons(sizeof(struct ip) + 20 + size);
char *raw_packet_header_data = s_ctx->ctrl_meta->raw_data;
int raw_packet_header_len = s_ctx->ctrl_meta->l7offset;