tc-wrapper
Advanced tools
Comparing version 1.0.11 to 1.0.12
@@ -177,6 +177,6 @@ 'use strict'; | ||
cmd: 'ip link set dev ' + this.ifbDevice + ' down', | ||
allowedErrors: [new RegExp('RTNETLINK answers: No such file or directory', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: No such file or directory', 'i'), new RegExp('Cannot find device', 'i')] | ||
}, { | ||
cmd: 'ip link delete ' + this.ifbDevice + ' type ifb', | ||
allowedErrors: [new RegExp('RTNETLINK answers: No such file or directory', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: No such file or directory', 'i'), new RegExp('Cannot find device', 'i')] | ||
}].forEach(function (c) { | ||
@@ -212,6 +212,6 @@ return commands.push(c); | ||
cmd: 'ip link add ' + this.ifbDevice + ' type ifb', | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}, { cmd: 'ip link set dev ' + this.ifbDevice + ' up', allowedErrors: [] }, { | ||
cmd: 'tc qdisc add dev ' + this.device + ' ingress', | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}, { | ||
@@ -218,0 +218,0 @@ cmd: 'tc filter add dev ' + this.device + ' parent ffff: protocol ' + this.protocol + ' u32 match u32 0 0 ' + ('flowid ' + this.deviceQdiscMajorId + ': action mirred egress redirect dev ' + this.ifbDevice), |
@@ -61,3 +61,3 @@ 'use strict'; | ||
cmd: 'tc qdisc add dev ' + this.device + ' root handle ' + this.deviceQdiscMajorId + ': htb ' + ('default ' + DEFAULT_CLASS_MINOR_ID), | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}; | ||
@@ -101,3 +101,3 @@ } | ||
cmd: 'tc class add dev ' + this.device + ' parent ' + this.deviceQdiscMajorId + ': classid ' + this.deviceQdiscMajorId + ':' + (DEFAULT_CLASS_MINOR_ID + ' htb rate ' + this.deviceMaxRate), | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}; | ||
@@ -111,3 +111,3 @@ } | ||
cmd: 'tc class add dev ' + this.device + ' parent ' + this.deviceQdiscMajorId + ': classid ' + this.deviceQdiscMajorId + ':' + (this._getQdiscMinorId() + ' htb rate ' + (customRate ? this.options.rate : this.deviceMaxRate) + ' ') + ('ceil ' + (customRate ? this.options.rate : this.deviceMaxRate)), | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}; | ||
@@ -131,3 +131,3 @@ | ||
cmd: 'tc qdisc add dev ' + this.device + ' parent ' + this.deviceQdiscMajorId + ':' + this.qdiscMinorId + ' ' + ('handle ' + this._getNetemMajorId() + ': netem'), | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}; | ||
@@ -157,3 +157,3 @@ | ||
cmd: 'tc filter add dev ' + this.device + ' protocol ip parent ' + this.deviceQdiscMajorId + ': prio 1 u32', | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i')] | ||
allowedErrors: [new RegExp('RTNETLINK answers: File exists', 'i'), new RegExp('Error: Exclusivity flag on, cannot modify.', 'i')] | ||
}; | ||
@@ -160,0 +160,0 @@ |
{ | ||
"name": "tc-wrapper", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "NodeJS wrapper for tc command (traffic control on linux)", | ||
@@ -5,0 +5,0 @@ "author": "J. Victor Soto", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41230