mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix 8072
This commit is contained in:
parent
996122d6bd
commit
6578a18f52
5 changed files with 0 additions and 172 deletions
|
@ -1,58 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
|
|
||||||
PKG_NAME:=cryptodev-linux
|
|
||||||
PKG_VERSION:=1.12
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
PKG_LICENSE_FILES:=COPYING
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define KernelPackage/cryptodev
|
|
||||||
SUBMENU:=Cryptographic API modules
|
|
||||||
TITLE:=Driver for cryptographic acceleration
|
|
||||||
URL:=http://cryptodev-linux.org/
|
|
||||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
|
||||||
DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
|
|
||||||
AUTOLOAD:=$(call AutoLoad,50,cryptodev)
|
|
||||||
MODPARAMS.cryptodev:=cryptodev_verbosity=-1
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/cryptodev/description
|
|
||||||
This is a driver for that allows to use the Linux kernel supported
|
|
||||||
hardware ciphers by user-space applications.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Configure
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
||||||
$(KERNEL_MAKE_FLAGS) \
|
|
||||||
KERNEL_DIR="$(LINUX_DIR)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,cryptodev))
|
|
|
@ -1,62 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2022 Chion Tang <tech@chionlab.moe>
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=fullconenat
|
|
||||||
PKG_RELEASE:=9
|
|
||||||
|
|
||||||
PKG_SOURCE_DATE:=2022-02-13
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/llccd/netfilter-full-cone-nat.git
|
|
||||||
PKG_SOURCE_VERSION:=108a36cbdca17e68c9e6e7fd5e26156a88f738e8
|
|
||||||
PKG_MIRROR_HASH:=00d749235271dee194dcd23c22e6e85207ea90192a62a110b2af0b4e4de1971f
|
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_MAINTAINER:=Chion Tang <tech@chionlab.moe>
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/iptables-mod-fullconenat
|
|
||||||
SUBMENU:=Firewall
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
TITLE:=FULLCONENAT iptables extension
|
|
||||||
DEPENDS:=+iptables +kmod-ipt-fullconenat
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/iptables-mod-fullconenat/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/iptables
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libipt_FULLCONENAT.so $(1)/usr/lib/iptables
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/ipt-fullconenat
|
|
||||||
SUBMENU:=Netfilter Extensions
|
|
||||||
TITLE:=FULLCONENAT netfilter module
|
|
||||||
DEPENDS:=+kmod-nf-ipt +kmod-nf-nat
|
|
||||||
KCONFIG:= \
|
|
||||||
CONFIG_NF_CONNTRACK_EVENTS=y \
|
|
||||||
CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/xt_FULLCONENAT.ko
|
|
||||||
endef
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
||||||
ARCH="$(LINUX_KARCH)" \
|
|
||||||
M="$(PKG_BUILD_DIR)" \
|
|
||||||
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
|
||||||
modules
|
|
||||||
$(call Build/Compile/Default)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,ipt-fullconenat))
|
|
||||||
$(eval $(call BuildPackage,iptables-mod-fullconenat))
|
|
|
@ -1,20 +0,0 @@
|
||||||
--- a/libip6t_FULLCONENAT.c
|
|
||||||
+++ b/libip6t_FULLCONENAT.c
|
|
||||||
@@ -214,6 +214,7 @@ static struct xtables_target fullconenat_tg_reg = {
|
|
||||||
.x6_options = FULLCONENAT_opts,
|
|
||||||
};
|
|
||||||
|
|
||||||
+#define _init __attribute__((constructor)) _INIT
|
|
||||||
void _init(void)
|
|
||||||
{
|
|
||||||
xtables_register_target(&fullconenat_tg_reg);
|
|
||||||
--- a/libipt_FULLCONENAT.c
|
|
||||||
+++ b/libipt_FULLCONENAT.c
|
|
||||||
@@ -235,6 +235,7 @@ static struct xtables_target fullconenat_tg_reg = {
|
|
||||||
.x6_options = FULLCONENAT_opts,
|
|
||||||
};
|
|
||||||
|
|
||||||
+#define _init __attribute__((constructor)) _INIT
|
|
||||||
void _init(void)
|
|
||||||
{
|
|
||||||
xtables_register_target(&fullconenat_tg_reg);
|
|
|
@ -1,26 +0,0 @@
|
||||||
--- a/xt_FULLCONENAT.c
|
|
||||||
+++ b/xt_FULLCONENAT.c
|
|
||||||
@@ -325,7 +325,11 @@
|
|
||||||
/* for now we do the same thing for both --random and --random-fully */
|
|
||||||
|
|
||||||
/* select a random starting point */
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
||||||
+ start = (uint16_t)(get_random_u32() % (u32)range_size);
|
|
||||||
+#else
|
|
||||||
start = (uint16_t)(prandom_u32() % (u32)range_size);
|
|
||||||
+#endif
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if ((original_port >= min && original_port <= min + range_size - 1)
|
|
||||||
@@ -995,7 +999,11 @@
|
|
||||||
/* for now we do the same thing for both --random and --random-fully */
|
|
||||||
|
|
||||||
/* select a random starting point */
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
||||||
+ start = (uint16_t)(get_random_u32() % (u32)range_size);
|
|
||||||
+#else
|
|
||||||
start = (uint16_t)(prandom_u32() % (u32)range_size);
|
|
||||||
+#endif
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if ((original_port >= min && original_port <= min + range_size - 1)
|
|
|
@ -1,6 +0,0 @@
|
||||||
libipt_FULLCONENAT.so: libipt_FULLCONENAT.o
|
|
||||||
$(CC) -shared -lxtables -o $@ $^;
|
|
||||||
libipt_FULLCONENAT.o: libipt_FULLCONENAT.c
|
|
||||||
$(CC) ${CFLAGS} -fPIC -D_INIT=$*_init -c -o $@ $<;
|
|
||||||
|
|
||||||
obj-m += xt_FULLCONENAT.o
|
|
Loading…
Add table
Add a link
Reference in a new issue