From: Nishant Chaprana Date: Tue, 13 Jun 2017 09:08:06 +0000 (+0530) Subject: Blocking incoming and outgoing traffic when specified limits are crosssed. X-Git-Tag: submit/tizen/20170620.103311~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=d7d0c6b61fc56bd65a385606c92d1b16e067f4f8;p=platform%2Fcore%2Fconnectivity%2Fstc-manager.git Blocking incoming and outgoing traffic when specified limits are crosssed. Change-Id: I39e872adf9980b457a2b4427ce06c5798ed88f14 Signed-off-by: Nishant Chaprana --- diff --git a/packaging/stc-manager.spec b/packaging/stc-manager.spec index 4852a41..d62e979 100644 --- a/packaging/stc-manager.spec +++ b/packaging/stc-manager.spec @@ -1,6 +1,6 @@ Name: stc-manager Summary: STC(Smart Traffic Control) manager -Version: 0.0.13 +Version: 0.0.14 Release: 0 Group: Network & Connectivity/Other License: Apache-2.0 diff --git a/src/monitor/stc-monitor.c b/src/monitor/stc-monitor.c index 3015b51..a0a58ff 100755 --- a/src/monitor/stc-monitor.c +++ b/src/monitor/stc-monitor.c @@ -570,8 +570,10 @@ static gboolean __rstn_counter_update_foreach_classid(gpointer key, /* block immediately */ if (rstn_value->counter.in_bytes >= rstn_value->limit.in_bytes) { + context->counter->intend = NFACCT_BLOCK; __del_iptables_in(context->counter); __add_iptables_in(context->counter); + context->counter->intend = NFACCT_COUNTER; rstn_value->in_limit_reached = TRUE; if (rstn_value->rstn_limit_crossed_notified == FALSE) { @@ -612,8 +614,10 @@ static gboolean __rstn_counter_update_foreach_classid(gpointer key, /* block immediately */ if (rstn_value->counter.out_bytes >= rstn_value->limit.out_bytes) { + context->counter->intend = NFACCT_BLOCK; __del_iptables_out(context->counter); __add_iptables_out(context->counter); + context->counter->intend = NFACCT_COUNTER; rstn_value->out_limit_reached = TRUE; if (rstn_value->rstn_limit_crossed_notified == FALSE) {