X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=iptables.c;h=58ec752af8df55e68f0cc1fd3215f412dd7c781c;hp=694dd4f6ab9a94bf58863a5acd9b1e11c8390239;hb=2f392a3b91c25c94abfc9a7862d908c923f7bf2b;hpb=1097a30f1d08c54e9483fb47fd4f25033e86d90d diff --git a/iptables.c b/iptables.c index 694dd4f..58ec752 100644 --- a/iptables.c +++ b/iptables.c @@ -744,6 +744,16 @@ fw3_ipt_rule_sport_dport(struct fw3_ipt_rule *r, } void +fw3_ipt_rule_device(struct fw3_ipt_rule *r, const char *device, bool out) +{ + if (device) { + struct fw3_device dev = { .any = false }; + strncpy(dev.name, device, sizeof(dev.name) - 1); + fw3_ipt_rule_in_out(r, (out) ? NULL : &dev, (out) ? &dev : NULL); + } +} + +void fw3_ipt_rule_mac(struct fw3_ipt_rule *r, struct fw3_mac *mac) { char buf[sizeof("ff:ff:ff:ff:ff:ff\0")];