summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author杨威 <[email protected]>2022-11-28 16:29:17 +0800
committer杨威 <[email protected]>2022-11-28 16:29:17 +0800
commit1d2fc6844492b4e8b341971fc729630030191f27 (patch)
treeed57b92b60f644ce2e9f5c8beeea5370c4c63392
parent040dca29181b499046c8a7e12e61eb0afc21da3c (diff)
🎈 perf(unknown proto log level): 调整输出不支持的协议日志级别为debug
-rw-r--r--src/dealpkt/deal_l2tp.c5
-rw-r--r--src/dealpkt/deal_udp.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/src/dealpkt/deal_l2tp.c b/src/dealpkt/deal_l2tp.c
index cc85759..8aa48f8 100644
--- a/src/dealpkt/deal_l2tp.c
+++ b/src/dealpkt/deal_l2tp.c
@@ -81,7 +81,8 @@ static int guess_l2tp_ppp_layer_len(const unsigned char *maybe_l2tp_ppp_hdr)
break;
}
}else{
- if((0x21 == maybe_l2tp_ppp_hdr[0]) || (0x57 == maybe_l2tp_ppp_hdr[0])){
+ if((0x21 == maybe_l2tp_ppp_hdr[0]) || (0x57 == maybe_l2tp_ppp_hdr[0])){
+
ppp_layer_len = 1; /* ʡ����control, address�ֶ�, ֻ��һ���ֽڵ�Э���, �ο�: http://www2.ic.uff.br/~michael/kr1999/5-datalink/5_08-ppp.htm#[RFC%201662] */
}
}
@@ -408,7 +409,7 @@ static int guess_if_l2tpv2(const struct streaminfo *a_udp, const struct mesa_udp
/* TODO 2, ��ʱֻ����L2TPv2�汾, L2TPv3������ */
if(2 != pl2tphdrv2->version){
if(3 == pl2tphdrv2->version){
- sapp_runtime_log(RLOG_LV_INFO, "recv l2tp version3 packet, but not support yet, TODO!\n");
+ sapp_runtime_log(RLOG_LV_DEBUG, "recv l2tp version3 packet, but not support yet, TODO!");
}
return 0;
}
diff --git a/src/dealpkt/deal_udp.c b/src/dealpkt/deal_udp.c
index ac2aa5e..6a05ac8 100644
--- a/src/dealpkt/deal_udp.c
+++ b/src/dealpkt/deal_udp.c
@@ -1019,22 +1019,22 @@ int process_ipv4_pkt (struct streamindex *pfindex,const struct mesa_ip4_hdr * a_
break;
case IPPROTO_L2TPV3:
- sapp_runtime_log(RLOG_LV_INFO, "recv ipv4 carry L2TPv3, not support yet!\n");
+ sapp_runtime_log(RLOG_LV_DEBUG, "recv ipv4 carry L2TPv3, not support yet!");
ret = PASS;
break;
case IPPROTO_ESP:
- sapp_runtime_log(RLOG_LV_INFO, "ipv4_layer recv IPPROTO_ESP, not support yet!\n");
+ sapp_runtime_log(RLOG_LV_DEBUG, "ipv4_layer recv IPPROTO_ESP, not support yet!");
ret = PASS;
break;
case IPPROTO_SCTP:
- sapp_runtime_log(RLOG_LV_INFO, "ipv4_layer recv IPPROTO_SCTP, not support yet!\n");
+ sapp_runtime_log(RLOG_LV_DEBUG, "ipv4_layer recv IPPROTO_SCTP, not support yet!");
ret = PASS;
break;
case IPPROTO_IGMP:
- sapp_runtime_log(RLOG_LV_INFO, "ipv4_layer recv IPPROTO_IGMP, not support yet!\n");
+ sapp_runtime_log(RLOG_LV_DEBUG, "ipv4_layer recv IPPROTO_IGMP, not support yet!");
ret = PASS;
break;
@@ -1042,7 +1042,7 @@ int process_ipv4_pkt (struct streamindex *pfindex,const struct mesa_ip4_hdr * a_
/* unknown protocol */
local_sys_stat->count[SAPP_STAT_RCV_UNKNOWN]++;
local_sys_stat->length[SAPP_STAT_RCV_UNKNOWN]+= raw_pkt->raw_pkt_len;
- sapp_runtime_log(RLOG_LV_INFO, "unsupport Ipv4 protocol:%u, pkt seq:%llu\n", a_packet->ip_p,local_sys_stat->count[SAPP_STAT_RCV_LINE]);
+ sapp_runtime_log(RLOG_LV_DEBUG, "unsupport Ipv4 protocol:%u, pkt seq:%llu", a_packet->ip_p,local_sys_stat->count[SAPP_STAT_RCV_LINE]);
break;
}