Skip to content

Commit

Permalink
FWAPI-197 Support for ranges of ports in firewall rule
Browse files Browse the repository at this point in the history
Reviewed by: Matt Smillie <matt.smillie@joyent.com>
  • Loading branch information
melloc committed Nov 20, 2015
1 parent c92af6c commit f25aeae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/fw/lib/fw.js
Expand Up @@ -809,9 +809,13 @@ function protoTarget(rule, target) {
} else {
if (target === 'all') {
return '';
}
} else if (target.hasOwnProperty('start')
&& target.hasOwnProperty('end')) {

return 'port = ' + target;
return 'port ' + target.start + ' : ' + target.end;
} else {
return 'port = ' + target;
}
}
}

Expand Down

0 comments on commit f25aeae

Please sign in to comment.