Skip to content

Commit

Permalink
comments and check
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeck committed Sep 4, 2014
1 parent 9849d75 commit 03840ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/iptables/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ exports.replace = require('./replace');
// Get the current chains and rules.
exports.dump = require('./dump');

// Check for existence of a rule in a chain.
exports.check = require('./check');

// General utility functions and constants.
exports.utils = require('./utils');
4 changes: 4 additions & 0 deletions lib/iptables/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ function hasOwnProperty(obj, key) {
}
exports.processCommonRuleSpecs = function (options) {
var args = [];

if (options.comment != null) {
args.push('--comment', String(options.comment).slice(0,255).replace(/[^A-Za-z_]/g,'\\$&'));
}

manage_arg(options.protocol, '--protocol', args);
manage_arg(options.source, '--source', args);
Expand Down

0 comments on commit 03840ff

Please sign in to comment.