mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 04:35:12 +02:00
iface: remove define for internal array size
The macro was only used inside kernel code and not relevant to user-space anyway.
This commit is contained in:
@@ -19,7 +19,7 @@ MODULE_ALIAS("ipt_iface");
|
||||
MODULE_ALIAS("ip6t_iface");
|
||||
//MODULE_ALIAS("arpt_iface");
|
||||
|
||||
static struct xt_iface_flag_pairs xt_iface_lookup[XT_IFACE_FLAGCOUNT] =
|
||||
static struct xt_iface_flag_pairs xt_iface_lookup[] =
|
||||
{
|
||||
{.iface_flag = XT_IFACE_UP, .iff_flag = IFF_UP},
|
||||
{.iface_flag = XT_IFACE_BROADCAST, .iff_flag = IFF_BROADCAST},
|
||||
@@ -45,7 +45,7 @@ static bool xt_iface_mt(const struct sk_buff *skb,
|
||||
dev = dev_get_by_name(&init_net, info->ifname);
|
||||
retval = dev != NULL;
|
||||
if (retval) {
|
||||
for (i = 0; i < XT_IFACE_FLAGCOUNT && retval; ++i) {
|
||||
for (i = 0; i < ARRAY_SIZE(xt_iface_lookup) && retval; ++i) {
|
||||
if (info->flags & xt_iface_lookup[i].iface_flag)
|
||||
retval &= dev->flags & xt_iface_lookup[i].iff_flag;
|
||||
if (info->invflags & xt_iface_lookup[i].iface_flag)
|
||||
|
@@ -1,8 +1,6 @@
|
||||
#ifndef _LINUX_NETFILTER_XT_IFACE_H
|
||||
#define _LINUX_NETFILTER_XT_IFACE_H 1
|
||||
|
||||
#define XT_IFACE_FLAGCOUNT 11
|
||||
|
||||
enum {
|
||||
XT_IFACE_UP = 1 << 0,
|
||||
XT_IFACE_BROADCAST = 1 << 1,
|
||||
|
Reference in New Issue
Block a user