tc-wrapper
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -252,3 +252,3 @@ 'use strict'; | ||
var actions = [this.del()]; | ||
var actions = [this.del]; | ||
@@ -260,33 +260,39 @@ // Store ids for multiple ruling | ||
// Iterate over all outgoing rules and set them | ||
actions.push(_bluebird2.default.mapSeries(Object.keys(rules.outgoing), function (rule) { | ||
var tcRuler = _this2._genTCRuler(_this2.device, 'outgoing', rule, rules.outgoing[rule], qdiscMinorId, netemMajorId); | ||
actions.push(function () { | ||
return _bluebird2.default.mapSeries(Object.keys(rules.outgoing), function (rule) { | ||
var tcRuler = _this2._genTCRuler(_this2.device, 'outgoing', rule, rules.outgoing[rule], qdiscMinorId, netemMajorId); | ||
return tcRuler.executeRules().then(function () { | ||
qdiscMinorId = tcRuler.qdiscMinorId; | ||
netemMajorId = tcRuler.netemMajorId; | ||
return tcRuler.executeRules().then(function () { | ||
qdiscMinorId = tcRuler.qdiscMinorId; | ||
netemMajorId = tcRuler.netemMajorId; | ||
}); | ||
}); | ||
})); | ||
}); | ||
if (rules.incoming && Object.keys(rules.incoming).length > 0) { | ||
actions.push(this._enableIfbDevice()); | ||
actions.push(this._enableIfbDevice); | ||
// Clean ids... | ||
actions.push(new _bluebird2.default(function (resolve) { | ||
qdiscMinorId = undefined; | ||
netemMajorId = undefined; | ||
resolve(null); | ||
})); | ||
actions.push(function () { | ||
return new _bluebird2.default(function (resolve) { | ||
qdiscMinorId = undefined; | ||
netemMajorId = undefined; | ||
resolve(null); | ||
}); | ||
}); | ||
} | ||
// Iterate over all incoming rules and set them | ||
actions.push(_bluebird2.default.mapSeries(Object.keys(rules.incoming), function (rule) { | ||
var tcRuler = _this2._genTCRuler(_this2.ifbDevice, 'incoming', rule, rules.incoming[rule], qdiscMinorId, netemMajorId); | ||
actions.push(function () { | ||
return _bluebird2.default.mapSeries(Object.keys(rules.incoming), function (rule) { | ||
var tcRuler = _this2._genTCRuler(_this2.ifbDevice, 'incoming', rule, rules.incoming[rule], qdiscMinorId, netemMajorId); | ||
return tcRuler.executeRules().then(function () { | ||
qdiscMinorId = tcRuler.qdiscMinorId; | ||
netemMajorId = tcRuler.netemMajorId; | ||
return tcRuler.executeRules().then(function () { | ||
qdiscMinorId = tcRuler.qdiscMinorId; | ||
netemMajorId = tcRuler.netemMajorId; | ||
}); | ||
}); | ||
})); | ||
}); | ||
return _bluebird2.default.mapSeries(actions, function (action) { | ||
return action; | ||
return action.bind(_this2)(); | ||
}); | ||
@@ -293,0 +299,0 @@ } |
{ | ||
"name": "tc-wrapper", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"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
37261
758