Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
80
package/network/utils/ebtables/Makefile
Normal file
80
package/network/utils/ebtables/Makefile
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ebtables
|
||||
PKG_SOURCE_DATE:=2018-06-27
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=https://git.netfilter.org/ebtables
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=48cff25dfea5b37e16ba5dc6601e98ab140f5f99
|
||||
PKG_MIRROR_HASH:=1ee560498e1a047b329eab3dad8425ae51e7f0527e4495efb99481ca11206b37
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_CPE_ID:=cpe:/a:netfilter:ebtables
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ebtables-legacy
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Firewall
|
||||
DEPENDS:=+kmod-ebtables
|
||||
TITLE:=Ethernet bridge firewall administration utility
|
||||
URL:=http://ebtables.sourceforge.net/
|
||||
PROVIDES:=ebtables
|
||||
ALTERNATIVES:=\
|
||||
200:/usr/sbin/ebtables:/usr/sbin/ebtables-legacy
|
||||
endef
|
||||
|
||||
define Package/ebtables-legacy-utils
|
||||
$(call Package/ebtables-legacy)
|
||||
DEPENDS:=ebtables-legacy
|
||||
TITLE:=ebtables save/restore utilities
|
||||
PROVIDES:=ebtables-utils
|
||||
ALTERNATIVES:=\
|
||||
200:/usr/sbin/ebtables-restore:/usr/sbin/ebtables-legacy-restore
|
||||
endef
|
||||
|
||||
define Package/ebtables-legacy/description
|
||||
The ebtables program is a filtering tool for a bridging firewall. The
|
||||
filtering is focussed on the Link Layer Ethernet frame fields. Apart
|
||||
from filtering, it also gives the ability to alter the Ethernet MAC
|
||||
addresses and implement a brouter.
|
||||
endef
|
||||
|
||||
define Package/ebtables-legacy-utils/description
|
||||
$(call Package/ebtables-legacy/description)
|
||||
endef
|
||||
|
||||
MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)"
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LIBDIR="/usr/lib/ebtables"
|
||||
|
||||
define Package/ebtables-legacy/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ebtables
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ebtables-legacy
|
||||
endef
|
||||
|
||||
define Package/ebtables-legacy-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
#ebtables-save depends on perl and is just broken
|
||||
#$(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/ebtables-legacy-save
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/ebtables-legacy-restore
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ebtables-legacy))
|
||||
$(eval $(call BuildPackage,ebtables-legacy-utils))
|
||||
@@ -0,0 +1,260 @@
|
||||
--- a/extensions/Makefile
|
||||
+++ b/extensions/Makefile
|
||||
@@ -11,13 +11,13 @@ EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -leb
|
||||
EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T))
|
||||
|
||||
extensions/ebt_%.so: extensions/ebt_%.o
|
||||
- $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
|
||||
+ $(CC) $(LDFLAGS) -shared -o $@ -lc $<
|
||||
|
||||
extensions/libebt_%.so: extensions/ebt_%.so
|
||||
mv $< $@
|
||||
|
||||
extensions/ebtable_%.so: extensions/ebtable_%.o
|
||||
- $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
|
||||
+ $(CC) $(LDFLAGS) -shared -o $@ -lc $<
|
||||
|
||||
extensions/libebtable_%.so: extensions/ebtable_%.so
|
||||
mv $< $@
|
||||
--- a/extensions/ebt_802_3.c
|
||||
+++ b/extensions/ebt_802_3.c
|
||||
@@ -141,7 +141,7 @@ static struct ebt_u_match _802_3_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&_802_3_match);
|
||||
}
|
||||
--- a/extensions/ebt_among.c
|
||||
+++ b/extensions/ebt_among.c
|
||||
@@ -491,7 +491,7 @@ static struct ebt_u_match among_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&among_match);
|
||||
}
|
||||
--- a/extensions/ebt_arp.c
|
||||
+++ b/extensions/ebt_arp.c
|
||||
@@ -362,7 +362,7 @@ static struct ebt_u_match arp_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&arp_match);
|
||||
}
|
||||
--- a/extensions/ebt_arpreply.c
|
||||
+++ b/extensions/ebt_arpreply.c
|
||||
@@ -133,7 +133,7 @@ static struct ebt_u_target arpreply_targ
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_target(&arpreply_target);
|
||||
}
|
||||
--- a/extensions/ebt_ip.c
|
||||
+++ b/extensions/ebt_ip.c
|
||||
@@ -472,7 +472,7 @@ static struct ebt_u_match ip_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&ip_match);
|
||||
}
|
||||
--- a/extensions/ebt_ip6.c
|
||||
+++ b/extensions/ebt_ip6.c
|
||||
@@ -413,7 +413,7 @@ static struct ebt_u_match ip6_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&ip6_match);
|
||||
}
|
||||
--- a/extensions/ebt_limit.c
|
||||
+++ b/extensions/ebt_limit.c
|
||||
@@ -212,7 +212,7 @@ static struct ebt_u_match limit_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&limit_match);
|
||||
}
|
||||
--- a/extensions/ebt_log.c
|
||||
+++ b/extensions/ebt_log.c
|
||||
@@ -217,7 +217,7 @@ static struct ebt_u_watcher log_watcher
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_watcher(&log_watcher);
|
||||
}
|
||||
--- a/extensions/ebt_mark.c
|
||||
+++ b/extensions/ebt_mark.c
|
||||
@@ -172,7 +172,7 @@ static struct ebt_u_target mark_target =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_target(&mark_target);
|
||||
}
|
||||
--- a/extensions/ebt_mark_m.c
|
||||
+++ b/extensions/ebt_mark_m.c
|
||||
@@ -121,7 +121,7 @@ static struct ebt_u_match mark_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&mark_match);
|
||||
}
|
||||
--- a/extensions/ebt_nat.c
|
||||
+++ b/extensions/ebt_nat.c
|
||||
@@ -231,7 +231,7 @@ static struct ebt_u_target dnat_target =
|
||||
.extra_ops = opts_d,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_target(&snat_target);
|
||||
ebt_register_target(&dnat_target);
|
||||
--- a/extensions/ebt_nflog.c
|
||||
+++ b/extensions/ebt_nflog.c
|
||||
@@ -166,7 +166,7 @@ static struct ebt_u_watcher nflog_watche
|
||||
.extra_ops = nflog_opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_watcher(&nflog_watcher);
|
||||
}
|
||||
--- a/extensions/ebt_pkttype.c
|
||||
+++ b/extensions/ebt_pkttype.c
|
||||
@@ -125,7 +125,7 @@ static struct ebt_u_match pkttype_match
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&pkttype_match);
|
||||
}
|
||||
--- a/extensions/ebt_redirect.c
|
||||
+++ b/extensions/ebt_redirect.c
|
||||
@@ -108,7 +108,7 @@ static struct ebt_u_target redirect_targ
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_target(&redirect_target);
|
||||
}
|
||||
--- a/extensions/ebt_standard.c
|
||||
+++ b/extensions/ebt_standard.c
|
||||
@@ -84,7 +84,7 @@ static struct ebt_u_target standard =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_target(&standard);
|
||||
}
|
||||
--- a/extensions/ebt_stp.c
|
||||
+++ b/extensions/ebt_stp.c
|
||||
@@ -337,7 +337,7 @@ static struct ebt_u_match stp_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&stp_match);
|
||||
}
|
||||
--- a/extensions/ebt_ulog.c
|
||||
+++ b/extensions/ebt_ulog.c
|
||||
@@ -180,7 +180,7 @@ static struct ebt_u_watcher ulog_watcher
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_watcher(&ulog_watcher);
|
||||
}
|
||||
--- a/extensions/ebt_vlan.c
|
||||
+++ b/extensions/ebt_vlan.c
|
||||
@@ -181,7 +181,7 @@ static struct ebt_u_match vlan_match = {
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&vlan_match);
|
||||
}
|
||||
--- a/extensions/ebtable_broute.c
|
||||
+++ b/extensions/ebtable_broute.c
|
||||
@@ -23,7 +23,7 @@ ebt_u_table table =
|
||||
.help = print_help,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_table(&table);
|
||||
}
|
||||
--- a/extensions/ebtable_filter.c
|
||||
+++ b/extensions/ebtable_filter.c
|
||||
@@ -29,7 +29,7 @@ static struct ebt_u_table table =
|
||||
.help = print_help,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_table(&table);
|
||||
}
|
||||
--- a/extensions/ebtable_nat.c
|
||||
+++ b/extensions/ebtable_nat.c
|
||||
@@ -30,7 +30,7 @@ ebt_u_table table =
|
||||
.help = print_help,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_table(&table);
|
||||
}
|
||||
--- a/extensions/ebt_string.c
|
||||
+++ b/extensions/ebt_string.c
|
||||
@@ -312,7 +312,7 @@ static struct ebt_u_match string_match =
|
||||
.extra_ops = opts,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__((constructor)) static void extension_init(void)
|
||||
{
|
||||
ebt_register_match(&string_match);
|
||||
}
|
||||
Reference in New Issue
Block a user