feat(firewall): add IP set blocking convenience API with CIDR interval support and optional rule comments
This commit is contained in:
@@ -137,4 +137,16 @@ tap.test('should build IP set match rule', async () => {
|
||||
expect(cmds[0]).toInclude('drop');
|
||||
});
|
||||
|
||||
tap.test('should build IP set match rule with comment', async () => {
|
||||
const cmds = buildIPSetMatchRule('mytable', 'ip', {
|
||||
setName: 'blocklist',
|
||||
direction: 'input',
|
||||
matchField: 'saddr',
|
||||
action: 'drop',
|
||||
comment: 'managed blocklist',
|
||||
});
|
||||
|
||||
expect(cmds[0]).toInclude('comment "managed blocklist"');
|
||||
});
|
||||
|
||||
export default tap.start();
|
||||
|
||||
Reference in New Issue
Block a user