diff options
| author | root <[email protected]> | 2024-02-22 08:24:59 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-02-22 08:24:59 +0000 |
| commit | 649ae58c11e8b00dfc06039c29a6550d42dae165 (patch) | |
| tree | 2957f8ff43c63e1858b8cab6b89e5c9d2684e8f6 /shaping/src/shaper_maat.cpp | |
| parent | 4c8abbadfebf8846f83d7dc72b3942c29a087a38 (diff) | |
add bidirectional limit direction
Diffstat (limited to 'shaping/src/shaper_maat.cpp')
| -rw-r--r-- | shaping/src/shaper_maat.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shaping/src/shaper_maat.cpp b/shaping/src/shaper_maat.cpp index ed68844..54d59c5 100644 --- a/shaping/src/shaper_maat.cpp +++ b/shaping/src/shaper_maat.cpp @@ -242,6 +242,14 @@ void shaper_profile_ex_new(const char *table_name, int table_id, const char *key LOG_ERROR("%s: json parse limit direction failed for profile id %d, line %s", LOG_TAG_MAAT, s_pf->id, table_line); goto END; } + + if (strncmp(tmp_obj->valuestring, "bidirectional", strlen(tmp_obj->valuestring)) == 0) { + s_pf->limit_direction = PROFILE_LIMIT_DIRECTION_BIDIRECTION; + s_pf->bidirection_limit_bandwidth = limit_bandwidth; + break;//config either bidirectional or incoming/outgoing limit + } + + s_pf->limit_direction = PROFILE_LIMIT_DIRECTION_INCOMING_OUTGOING; if (strncmp(tmp_obj->valuestring, "incoming", strlen(tmp_obj->valuestring)) == 0) { s_pf->in_limit_bandwidth = limit_bandwidth; } else { @@ -287,6 +295,7 @@ void shaper_profile_update(struct shaping_thread_ctx *ctx, struct shaping_profil s_pf_info->type = s_pf_ex->type; shaper_profile_hash_node_update(ctx, s_pf_info); s_pf_info->hash_node->aqm_type = s_pf_ex->aqm_type; + s_pf_info->hash_node->limit_direction = s_pf_ex->limit_direction; return; } |
