From 749fdc9a49ebcd270396ed274f88160bd2f57e97 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Sat, 8 May 2021 09:34:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E4=B8=ADIP+=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E7=AD=96=E7=95=A5=EF=BC=8C=E4=BD=86=E6=9C=AA?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=87=BA=E5=9F=9F=E5=90=8D=EF=BC=8C=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E4=BF=9D=E5=AD=98=E6=9C=AA=E5=88=A4=E6=96=AD=E7=A9=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=AE=B5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_entry.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index 3a68381..71b3e40 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -422,9 +422,12 @@ static void copy_intercept_result(const struct streaminfo *a_stream, struct mast memset(priority_label, 0, sizeof(policy_priority_label_t)); priority_label->proto=proto; - priority_label->domain_len=MIN(sizeof(priority_label->domain)-1 ,strlen(domain)); - memcpy(priority_label->domain, domain, priority_label->domain_len); - + if(domain!=NULL) + { + priority_label->domain_len=MIN(sizeof(priority_label->domain)-1 ,strlen(domain)); + memcpy(priority_label->domain, domain, priority_label->domain_len); + } + priority_label->result_num=1; priority_label->result_type=PULL_KNI_RESULT; memcpy(priority_label->result, p_result, sizeof(struct Maat_rule_t));