summaryrefslogtreecommitdiffstats
path: root/media/tools/constrained_network_server/traffic_control.py
diff options
context:
space:
mode:
authorshadi@chromium.org <shadi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 01:46:37 +0000
committershadi@chromium.org <shadi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 01:46:37 +0000
commit8bc584e620bac5f0119897fa87160da99f5ff256 (patch)
tree961810fcd6cbf06e65c92684b9b4a9b7f4ddac40 /media/tools/constrained_network_server/traffic_control.py
parent8a9e1a19230ab3711d141d4b969db81aa4d10ca5 (diff)
downloadchromium_src-8bc584e620bac5f0119897fa87160da99f5ff256.zip
chromium_src-8bc584e620bac5f0119897fa87160da99f5ff256.tar.gz
chromium_src-8bc584e620bac5f0119897fa87160da99f5ff256.tar.bz2
Merging CNS server with scripts.
Merging the constrained network scripts (http://crrev.com/114355) with the constrained network server (http://crrev.com/110458). Some changes made to the CNS scripts to support local server setup. BUG=104242 TEST=Unit tests and ran locally Review URL: http://codereview.chromium.org/8856001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools/constrained_network_server/traffic_control.py')
-rwxr-xr-xmedia/tools/constrained_network_server/traffic_control.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/media/tools/constrained_network_server/traffic_control.py b/media/tools/constrained_network_server/traffic_control.py
index d6527ff..aa8a157 100755
--- a/media/tools/constrained_network_server/traffic_control.py
+++ b/media/tools/constrained_network_server/traffic_control.py
@@ -259,13 +259,11 @@ def _GetFilterHandleId(interface, port):
"""
command = ['tc', 'filter', 'list', 'dev', interface, 'parent', '1:']
output = _Exec(command, msg='Error listing filters.')
-
# Search for the filter handle ID associated with class ID '1:port'.
handle_id_re = re.search(
- '([0-9a-fA-F]{3}::[0-9a-fA-F]{3}).*(?=flowid 1:%x$)' % port, output)
+ '([0-9a-fA-F]{3}::[0-9a-fA-F]{3}).*(?=flowid 1:%x\s)' % port, output)
if handle_id_re:
return handle_id_re.group(1)
-
raise TrafficControlError(('Could not find filter handle ID for class ID '
'1:%x.') % port)