OSDN Git Service

BandwidthController: fixup insertion pos in costly chain handling
authorJP Abgrall <jpa@google.com>
Wed, 13 Feb 2013 03:20:13 +0000 (19:20 -0800)
committerJP Abgrall <jpa@google.com>
Thu, 14 Feb 2013 01:20:15 +0000 (17:20 -0800)
commit109899bc63139c5260cb9a7dc409f92efaf2c4b7
tree2b65c64f559f67c8676cbd96934e7f365f8ee212
parentc8dc63b14f5bcef34a23061c17d3bbe66df51429
BandwidthController: fixup insertion pos in costly chain handling

* Long time ago, setting an alert in a costly_<iface> chain required adding
it just before the ACCEPT rule that was at the end.
But since then the ACCEPT rule has been removed.
This would cause the insert to pick the last position no matter what.
Now we just append.

* A naughty app in the penalty box could waste up quota on packets that would
get dropped in the later penalty_box rule.
Now we check the penalty_box before feeding it to the quota.

Change-Id: Id4b6a7c020583f1cccc7dccde34c4b85d0fd9642
BandwidthController.cpp
BandwidthController.h