summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2021-05-12 13:51:51 +0800
committerliuxueli <[email protected]>2021-05-12 13:51:51 +0800
commitbc29a6ca00172623ab6fb73e00966a43f39602ec (patch)
tree26b2862f780429755299d138173ba7f54fb5cbf2
parentce7120dd6e1f9848b47230c7b9ef880514517ea9 (diff)
修正协议ID的值v4.1.1
判断发送日志字段的长度是否为0
-rw-r--r--bin/tsg_l7_protocol.conf16
-rw-r--r--src/tsg_send_log.cpp5
2 files changed, 12 insertions, 9 deletions
diff --git a/bin/tsg_l7_protocol.conf b/bin/tsg_l7_protocol.conf
index 7b53843..6981802 100644
--- a/bin/tsg_l7_protocol.conf
+++ b/bin/tsg_l7_protocol.conf
@@ -1,16 +1,16 @@
#TYPE:1:UCHAR,2:USHORT,3:USTRING,4:ULOG,5:USTRING,6:FILE,7:UBASE64,8:PACKET
#TYPE FIELD VALUE
-STRING UNCATEGORIZED 15001
-#STRING UNCATEGORIZED 15002
-#STRING UNKNOWN_OTHER 15003
+STRING UNCATEGORIZED 8000
+#STRING UNCATEGORIZED 8001
+#STRING UNKNOWN_OTHER 8002
STRING DNS 32
STRING FTP 45
STRING FTPS 751
STRING HTTP 67
STRING HTTPS 68
STRING ICMP 70
-STRING IKE 15004
-STRING MAIL 15005
+STRING IKE 8003
+STRING MAIL 8004
STRING IMAP 75
STRING IMAPS 76
STRING IPSEC 85
@@ -28,7 +28,7 @@ STRING SMTPS 187
STRING SPDY 1469
STRING SSH 198
STRING SSL 199
-STRING SOCKS 15006
+STRING SOCKS 8005
STRING TELNET 209
STRING DHCP 29
STRING RADIUS 158
@@ -36,7 +36,7 @@ STRING OPENVPN 336
STRING STUN 201
STRING TEREDO 555
STRING DTLS 1291
-STRING DoH 15007
+STRING DoH 8006
STRING ISAKMP 92
STRING MDNS 3835
STRING NETBIOS 129
@@ -44,7 +44,7 @@ STRING NETFLOW 130
STRING RDP 150
STRING RTCP 174
STRING RTP 175
-STRING SLP 15008
+STRING SLP 8007
STRING SNMP 190
STRING SSDP 197
STRING TFTP 211
diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp
index ab9d891..5a304f1 100644
--- a/src/tsg_send_log.cpp
+++ b/src/tsg_send_log.cpp
@@ -632,6 +632,10 @@ int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE typ
case TLD_TYPE_FILE:
break;
case TLD_TYPE_STRING:
+ if(strlen((char *)value)==0)
+ {
+ break;
+ }
cJSON_AddStringToObject(_handle->object, key, (char *)value);
break;
case TLD_TYPE_CJSON:
@@ -641,7 +645,6 @@ int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE typ
return -1;
break;
}
-
return 0;
}