diff options
author | Steven Barth <steven@midlink.org> | 2014-04-13 18:41:06 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-04-14 08:50:21 +0200 |
commit | 2f392a3b91c25c94abfc9a7862d908c923f7bf2b (patch) | |
tree | f13c752edad444580a25c3991eba2071c1608072 /rules.c | |
parent | 1097a30f1d08c54e9483fb47fd4f25033e86d90d (diff) | |
download | firewall3-2f392a3b91c25c94abfc9a7862d908c923f7bf2b.tar.gz |
Add support for device and direction parameters
Signed-off-by: Steven Barth <steven@midlink.org>
Diffstat (limited to 'rules.c')
-rw-r--r-- | rules.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -28,6 +28,9 @@ const struct fw3_option fw3_rule_opts[] = { FW3_OPT("src", device, rule, src), FW3_OPT("dest", device, rule, dest), + FW3_OPT("device", string, rule, device), + FW3_OPT("direction", direction, rule, direction_out), + FW3_OPT("ipset", setmatch, rule, ipset), FW3_LIST("proto", protocol, rule, proto), @@ -350,6 +353,7 @@ print_rule(struct fw3_ipt_handle *handle, struct fw3_state *state, r = fw3_ipt_rule_create(handle, proto, NULL, NULL, sip, dip); fw3_ipt_rule_sport_dport(r, sport, dport); + fw3_ipt_rule_device(r, rule->device, rule->direction_out); fw3_ipt_rule_icmptype(r, icmptype); fw3_ipt_rule_mac(r, mac); fw3_ipt_rule_ipset(r, &rule->ipset); |