summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2024-02-22 17:18:48 +0800
committerfengweihao <[email protected]>2024-02-22 17:18:48 +0800
commit43a9b6474e369e061a856fe6297f696427b38d29 (patch)
tree2d27660c60f9ee4d6cc81f20afb97eb435c4d958
parentcf20f2d1f9d9d286f65b78c2ce30bd2cb811dd82 (diff)
TSG-19435 修复Manipulation以Port作为Condition时,策略无法命中v4.8.65-20240222
-rw-r--r--common/src/tfe_scan.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/src/tfe_scan.cpp b/common/src/tfe_scan.cpp
index 53df5c7..2f22ac4 100644
--- a/common/src/tfe_scan.cpp
+++ b/common/src/tfe_scan.cpp
@@ -373,7 +373,7 @@ int tfe_scan_port(const struct tfe_stream *stream, long long *result, struct maa
int hit_cnt_port = 0;
size_t n_hit_result = 0;
- scan_ret=maat_scan_integer((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_SOURCE_PORT), source,
+ scan_ret=maat_scan_integer((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_SOURCE_PORT), ntohs(source),
result+hit_cnt+hit_cnt_port, MAX_SCAN_RESULT-hit_cnt-hit_cnt_port, &n_hit_result, scan_mid);
if(scan_ret == MAAT_SCAN_HIT)
{
@@ -391,7 +391,7 @@ int tfe_scan_port(const struct tfe_stream *stream, long long *result, struct maa
hit_cnt_port+=scan_ret;
}
- scan_ret=maat_scan_integer((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_DESTINATION_PORT), dest,
+ scan_ret=maat_scan_integer((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_DESTINATION_PORT), ntohs(dest),
result+hit_cnt+hit_cnt_port, MAX_SCAN_RESULT-hit_cnt-hit_cnt_port, &n_hit_result, scan_mid);
if(scan_ret == MAAT_SCAN_HIT)
{