diff options
| author | fengweihao <[email protected]> | 2023-03-14 10:36:03 +0800 |
|---|---|---|
| committer | fengweihao <[email protected]> | 2023-03-14 10:36:03 +0800 |
| commit | 92e9c25946b952c7209ab2f7135451e0ea58a928 (patch) | |
| tree | 77b065b5e127964ba8ebce9ca3b2a0e39d6e734f /scan/src | |
| parent | 212cd1a4f6c83ee5a2099f1c8077deb05bb8d716 (diff) | |
TSG-14186 策略验证支持Service Chainingv2.4.0-20230314master
Diffstat (limited to 'scan/src')
| -rw-r--r-- | scan/src/policy_scan.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/scan/src/policy_scan.cpp b/scan/src/policy_scan.cpp index 7c37c50..8a39f63 100644 --- a/scan/src/policy_scan.cpp +++ b/scan/src/policy_scan.cpp @@ -34,6 +34,7 @@ enum policy_action PG_ACTION_REJECT = 0x10, PG_ACTION_SHAPING = 0x20, PG_ACTION_MANIPULATE = 0x30, + PG_ACTION_SERVICE_CHAINING = 0x40, PG_ACTION_INLINE_DEVICE = 0x60, PG_ACTION_WHITELIST = 0x80, __PG_ACTION_MAX @@ -754,7 +755,11 @@ static enum policy_action decide_ctrl_action(enum verify_policy_type policy_type { continue; } - if (shaping == 0 && __action == PG_ACTION_SHAPING) + if (shaping ==2 && __action != PG_ACTION_SERVICE_CHAINING) + { + continue; + } + if (shaping == 0 && (__action == PG_ACTION_SHAPING || __action == PG_ACTION_SERVICE_CHAINING)) { continue; } @@ -950,7 +955,11 @@ int verify_shaping_policy_filter(struct verify_policy_scan_ctx * ctx, int shapin { return 1; } - if(shaping == 0 && ctx->result[i].action != PG_ACTION_SHAPING) + if(shaping == 2 && ctx->result[i].action == PG_ACTION_SERVICE_CHAINING) + { + return 1; + } + if(shaping == 0 && (ctx->result[i].action != PG_ACTION_SHAPING || ctx->result[i].action != PG_ACTION_SERVICE_CHAINING)) { return 1; } @@ -1059,7 +1068,11 @@ int http_hit_policy_list(enum verify_policy_type policy_type, int shaping, size_ { continue; } - if(shaping == 0 && ctx->result[i].action == PG_ACTION_SHAPING) + if(shaping == 2 && ctx->result[i].action != PG_ACTION_SERVICE_CHAINING) + { + continue; + } + if(shaping == 0 && (ctx->result[i].action == PG_ACTION_SHAPING || ctx->result[i].action == PG_ACTION_SERVICE_CHAINING)) { continue; } |
