mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 11:34:57 +02:00
iface: some command decoupling
This commit is contained in:
@@ -42,14 +42,14 @@ static bool xt_iface_mt(const struct sk_buff *skb,
|
||||
bool retval;
|
||||
int i;
|
||||
|
||||
retval =
|
||||
(dev = dev_get_by_name(&init_net, info->ifname)) != NULL;
|
||||
dev = dev_get_by_name(&init_net, info->ifname);
|
||||
retval = dev != NULL;
|
||||
if (retval) {
|
||||
for (i = 0; i < XT_IFACE_FLAGCOUNT && retval; ++i) {
|
||||
if (info->flags & xt_iface_lookup[i].iface_flag)
|
||||
retval = retval && (dev->flags & xt_iface_lookup[i].iff_flag);
|
||||
retval &= dev->flags & xt_iface_lookup[i].iff_flag;
|
||||
if (info->invflags & xt_iface_lookup[i].iface_flag)
|
||||
retval = retval && !(dev->flags & xt_iface_lookup[i].iff_flag);
|
||||
retval &= !(dev->flags & xt_iface_lookup[i].iff_flag);
|
||||
}
|
||||
dev_put(dev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user