diff options
| author | liuxueli <[email protected]> | 2023-06-25 16:00:48 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2023-06-25 17:40:26 +0800 |
| commit | 6b543210768524273473f016aac7962f82ae73c5 (patch) | |
| tree | 6d6c415864561065df6598bb16afc3d84a863b4c | |
| parent | 72640e6a20063a3537ba9d3af5ea1e81ab77c0b7 (diff) | |
TSG-15684: 修复S2C单向流情况下MAC地址为0的问题v5.8.19
| -rw-r--r-- | bin/tsg_log_field.conf | 8 | ||||
| -rw-r--r-- | src/tsg_send_log.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bin/tsg_log_field.conf b/bin/tsg_log_field.conf index 36c4037..eb34951 100644 --- a/bin/tsg_log_field.conf +++ b/bin/tsg_log_field.conf @@ -120,7 +120,7 @@ STRING dtls_sni 107 STRING common_tunnel_endpoint_a_desc 108 STRING common_tunnel_endpoint_b_desc 109 LONG common_t_vsys_id 110 -STRING common_incoming_source_mac 111 -STRING common_incoming_destination_mac 112 -STRING common_outgoing_source_mac 113 -STRING common_outgoing_destination_mac 114
\ No newline at end of file +STRING common_in_src_mac 111 +STRING common_in_dest_mac 112 +STRING common_out_src_mac 113 +STRING common_out_dest_mac 114
\ No newline at end of file diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index 04316b2..4ea95e0 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -969,9 +969,9 @@ int direction_I2E(struct tsg_log_instance_t *_instance, struct TLD_handle_t *_ha TLD_append(_handle, _instance->id2field[LOG_COMMON_OUTCOMING_DST_MAC].name, (void *)dst_mac_string, TLD_TYPE_STRING); break; case DIR_S2C: // S2C and I2E = incoming - mac_to_string(mac_addr->mac->src_addr.h_source, src_mac_string); + mac_to_string(mac_addr->mac->dst_addr.h_source, src_mac_string); TLD_append(_handle, _instance->id2field[LOG_COMMON_INCOMING_SRC_MAC].name, (void *)src_mac_string, TLD_TYPE_STRING); - mac_to_string(mac_addr->mac->src_addr.h_dest, dst_mac_string); + mac_to_string(mac_addr->mac->dst_addr.h_dest, dst_mac_string); TLD_append(_handle, _instance->id2field[LOG_COMMON_INCOMING_DST_MAC].name, (void *)dst_mac_string, TLD_TYPE_STRING); break; case DIR_DOUBLE: // first pkt @@ -1020,9 +1020,9 @@ int direction_E2I(struct tsg_log_instance_t *_instance, struct TLD_handle_t *_ha TLD_append(_handle, _instance->id2field[LOG_COMMON_INCOMING_DST_MAC].name, (void *)dst_mac_string, TLD_TYPE_STRING); break; case DIR_S2C: // S2C and E2I = outcoming - mac_to_string(mac_addr->mac->src_addr.h_source, src_mac_string); + mac_to_string(mac_addr->mac->dst_addr.h_source, src_mac_string); TLD_append(_handle, _instance->id2field[LOG_COMMON_OUTCOMING_SRC_MAC].name, (void *)src_mac_string, TLD_TYPE_STRING); - mac_to_string(mac_addr->mac->src_addr.h_dest, dst_mac_string); + mac_to_string(mac_addr->mac->dst_addr.h_dest, dst_mac_string); TLD_append(_handle, _instance->id2field[LOG_COMMON_OUTCOMING_DST_MAC].name, (void *)dst_mac_string, TLD_TYPE_STRING); break; case DIR_DOUBLE: // first pkt |
