mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 13:44:56 +02:00
Merge branch 'iface'
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/netfilter/x_tables.h>
|
#include <linux/netfilter/x_tables.h>
|
||||||
#include "xt_iface.h"
|
#include "xt_iface.h"
|
||||||
|
#include "compat_xtables.h"
|
||||||
|
|
||||||
struct xt_iface_flag_pairs {
|
struct xt_iface_flag_pairs {
|
||||||
uint16_t iface_flag;
|
uint16_t iface_flag;
|
||||||
@@ -47,7 +48,11 @@ static bool xt_iface_mt(const struct sk_buff *skb,
|
|||||||
bool retval;
|
bool retval;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dev = dev_get_by_name(&init_net, info->ifname);
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
|
||||||
|
dev = dev_get_by_name(&init_net, info->ifname);
|
||||||
|
#else
|
||||||
|
dev = dev_get_by_name(info->ifname);
|
||||||
|
#endif
|
||||||
retval = dev != NULL;
|
retval = dev != NULL;
|
||||||
if (retval) {
|
if (retval) {
|
||||||
for (i = 0; i < ARRAY_SIZE(xt_iface_lookup) && retval; ++i) {
|
for (i = 0; i < ARRAY_SIZE(xt_iface_lookup) && retval; ++i) {
|
||||||
@@ -68,7 +73,6 @@ static struct xt_match xt_iface_mt_reg[] __read_mostly = {
|
|||||||
.family = NFPROTO_IPV4,
|
.family = NFPROTO_IPV4,
|
||||||
.matchsize = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
|
.matchsize = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
|
||||||
.match = xt_iface_mt,
|
.match = xt_iface_mt,
|
||||||
.data = 0,
|
|
||||||
.me = THIS_MODULE,
|
.me = THIS_MODULE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -77,7 +81,6 @@ static struct xt_match xt_iface_mt_reg[] __read_mostly = {
|
|||||||
.family = NFPROTO_IPV6,
|
.family = NFPROTO_IPV6,
|
||||||
.matchsize = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
|
.matchsize = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
|
||||||
.match = xt_iface_mt,
|
.match = xt_iface_mt,
|
||||||
.data = 0,
|
|
||||||
.me = THIS_MODULE,
|
.me = THIS_MODULE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user