Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 043ef46c authored by Jan Engelhardt's avatar Jan Engelhardt Committed by Patrick McHardy
Browse files

netfilter: move Ebtables to use Xtables

parent 2d06d4a5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ struct ebt_entry_match
{
	union {
		char name[EBT_FUNCTION_MAXNAMELEN];
		struct ebt_match *match;
		struct xt_match *match;
	} u;
	/* size of data */
	unsigned int match_size;
@@ -135,7 +135,7 @@ struct ebt_entry_watcher
{
	union {
		char name[EBT_FUNCTION_MAXNAMELEN];
		struct ebt_watcher *watcher;
		struct xt_target *watcher;
	} u;
	/* size of data */
	unsigned int watcher_size;
@@ -146,7 +146,7 @@ struct ebt_entry_target
{
	union {
		char name[EBT_FUNCTION_MAXNAMELEN];
		struct ebt_target *target;
		struct xt_target *target;
	} u;
	/* size of data */
	unsigned int target_size;
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ menu "Bridge: Netfilter Configuration"

config BRIDGE_NF_EBTABLES
	tristate "Ethernet Bridge tables (ebtables) support"
	select NETFILTER_XTABLES
	help
	  ebtables is a general, extensible frame/packet identification
	  framework. Say 'Y' or 'M' here if you want to do Ethernet
+4 −4
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ ebt_802_3_mt_check(const char *table, const void *entry,
	return true;
}

static struct ebt_match filter_802_3 __read_mostly = {
	.name		= EBT_802_3_MATCH,
static struct xt_match ebt_802_3_mt_reg __read_mostly = {
	.name		= "802_3",
	.revision	= 0,
	.family		= NFPROTO_BRIDGE,
	.match		= ebt_802_3_mt,
@@ -63,12 +63,12 @@ static struct ebt_match filter_802_3 __read_mostly = {

static int __init ebt_802_3_init(void)
{
	return ebt_register_match(&filter_802_3);
	return xt_register_match(&ebt_802_3_mt_reg);
}

static void __exit ebt_802_3_fini(void)
{
	ebt_unregister_match(&filter_802_3);
	xt_unregister_match(&ebt_802_3_mt_reg);
}

module_init(ebt_802_3_init);
+7 −7
Original line number Diff line number Diff line
@@ -7,12 +7,12 @@
 *  August, 2003
 *
 */

#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_among.h>
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/module.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_among.h>

static bool ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh,
				      const char *mac, __be32 ip)
@@ -211,8 +211,8 @@ ebt_among_mt_check(const char *table, const void *entry,
	return true;
}

static struct ebt_match filter_among __read_mostly = {
	.name		= EBT_AMONG_MATCH,
static struct xt_match ebt_among_mt_reg __read_mostly = {
	.name		= "among",
	.revision	= 0,
	.family		= NFPROTO_BRIDGE,
	.match		= ebt_among_mt,
@@ -223,12 +223,12 @@ static struct ebt_match filter_among __read_mostly = {

static int __init ebt_among_init(void)
{
	return ebt_register_match(&filter_among);
	return xt_register_match(&ebt_among_mt_reg);
}

static void __exit ebt_among_fini(void)
{
	ebt_unregister_match(&filter_among);
	xt_unregister_match(&ebt_among_mt_reg);
}

module_init(ebt_among_init);
+4 −4
Original line number Diff line number Diff line
@@ -119,8 +119,8 @@ ebt_arp_mt_check(const char *table, const void *entry,
	return true;
}

static struct ebt_match filter_arp __read_mostly = {
	.name		= EBT_ARP_MATCH,
static struct xt_match ebt_arp_mt_reg __read_mostly = {
	.name		= "arp",
	.revision	= 0,
	.family		= NFPROTO_BRIDGE,
	.match		= ebt_arp_mt,
@@ -131,12 +131,12 @@ static struct ebt_match filter_arp __read_mostly = {

static int __init ebt_arp_init(void)
{
	return ebt_register_match(&filter_arp);
	return xt_register_match(&ebt_arp_mt_reg);
}

static void __exit ebt_arp_fini(void)
{
	ebt_unregister_match(&filter_arp);
	xt_unregister_match(&ebt_arp_mt_reg);
}

module_init(ebt_arp_init);
Loading