mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'test' into ipq807x
This commit is contained in:
commit
7293bac776
20 changed files with 696 additions and 18 deletions
0
aquantia/Makefile
Normal file → Executable file
0
aquantia/Makefile
Normal file → Executable file
|
@ -75,6 +75,12 @@ if uname.release:sub(1,4) == "5.15" or uname.release:sub(1,1) == "6" then
|
|||
o.datatype = "uinteger"
|
||||
o.rmempty = false
|
||||
o.default = 4
|
||||
|
||||
o = s:option(Value, "mptcp_add_addr_timeout", translate("Set the timeout after which an ADD_ADDR control message will be resent to an MPTCP peer that has not acknowledged a previous ADD_ADDR message."))
|
||||
o.datatype = "uinteger"
|
||||
o.rmempty = false
|
||||
o.default = 120
|
||||
|
||||
else
|
||||
o = s:option(Value, "mptcp_fullmesh_num_subflows", translate("Fullmesh subflows for each pair of IP addresses"))
|
||||
o.datatype = "uinteger"
|
||||
|
|
97
luci-app-sysupgrade/po/fr/sysupgrade.po~
Executable file
97
luci-app-sysupgrade/po/fr/sysupgrade.po~
Executable file
|
@ -0,0 +1,97 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2021-03-31 15:07+0000\n"
|
||||
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
|
||||
"Language-Team: French <http://weblate.openmptcprouter.com/projects/omr/"
|
||||
"luciapplicationssysupgrade/fr/>\n"
|
||||
"Language: fr\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 4.5.2\n"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:90
|
||||
msgid "Check \"Keep settings\" to retain the current configuration."
|
||||
msgstr ""
|
||||
"Cochez \"Conserver les paramètres\" pour conserver la configuration actuelle."
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:344
|
||||
msgid "Downloading firmware to web browser memory"
|
||||
msgstr "Téléchargement du micrologiciel dans la mémoire du navigateur Web"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:78
|
||||
msgid "Easily search and install new releases and package upgrades."
|
||||
msgstr ""
|
||||
"Recherchez et installez facilement les nouvelles versions et les mises à "
|
||||
"niveau des paquets."
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:99
|
||||
msgid "Edit installed packages"
|
||||
msgstr "Modifier les packages installés"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:269
|
||||
msgid "Flashing firmware. Don't unpower device"
|
||||
msgstr "Mise à jour du micrologiciel. Ne débranchez pas l'appareil"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:192
|
||||
msgid "Installed version:"
|
||||
msgstr "Version installée :"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:92
|
||||
msgid "Keep settings:"
|
||||
msgstr "Conserver les paramètres :"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:215
|
||||
msgid "No upgrades available"
|
||||
msgstr "Pas de mise à jour disponible"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:285
|
||||
msgid "Rebooting device - please wait!"
|
||||
msgstr "Redémarrage de l'appareil - veuillez patienter !"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:209
|
||||
msgid "Request firmware"
|
||||
msgstr "Demander le micrologiciel"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:110
|
||||
msgid "Search for upgrades"
|
||||
msgstr "Rechercher des mises à jour"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:165
|
||||
msgid "Searching for upgrades"
|
||||
msgstr "Recherche des mises à jour"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:103
|
||||
msgid "Server:"
|
||||
msgstr "Serveur :"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:289
|
||||
msgid "Success! Please reload web interface"
|
||||
msgstr "Succès ! Veuillez recharger l'interface Web"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:76
|
||||
#: luci-app-sysupgrade/root/usr/share/luci/menu.d/luci-app-sysupgrade.json:3
|
||||
msgid "Sysupgrade"
|
||||
msgstr "Mise à jour système"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:320
|
||||
msgid "Upload of firmware failed, please retry by reloading web interface"
|
||||
msgstr ""
|
||||
"Le téléchargement du micrologiciel a échoué, veuillez réessayer en "
|
||||
"rechargeant l'interface Web"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:305
|
||||
msgid "Uploading firmware to device"
|
||||
msgstr "Téléchargement du micrologiciel sur l'appareil"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:299
|
||||
msgid ""
|
||||
"Web interface could not reconnect to your device. Please reload web "
|
||||
"interface or check device manually"
|
||||
msgstr ""
|
||||
"L'interface Web n'a pas pu se reconnecter à votre appareil. Recharger "
|
||||
"l'interface"
|
||||
|
||||
#: luci-app-sysupgrade/root/usr/share/rpcd/acl.d/sysupgrade.json:3
|
||||
msgid "sysupgrade via rpcd and luci"
|
||||
msgstr "Mise à jour système via rpcd et luci"
|
90
luci-app-sysupgrade/po/zh_Hans/sysupgrade.po~
Executable file
90
luci-app-sysupgrade/po/zh_Hans/sysupgrade.po~
Executable file
|
@ -0,0 +1,90 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2021-04-30 16:03+0000\n"
|
||||
"Last-Translator: niergouge <1150108426@qq.com>\n"
|
||||
"Language-Team: Chinese (Simplified) <http://weblate.openmptcprouter.com/"
|
||||
"projects/omr/luciapplicationssysupgrade/zh_Hans/>\n"
|
||||
"Language: zh_Hans\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 4.5.2\n"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:90
|
||||
msgid "Check \"Keep settings\" to retain the current configuration."
|
||||
msgstr "勾选保持当前配置。"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:344
|
||||
msgid "Downloading firmware to web browser memory"
|
||||
msgstr "下载固件到网页浏览器内存"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:78
|
||||
msgid "Easily search and install new releases and package upgrades."
|
||||
msgstr "轻松搜索和安装新版本和包升级。"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:99
|
||||
msgid "Edit installed packages"
|
||||
msgstr "编辑安装包"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:269
|
||||
msgid "Flashing firmware. Don't unpower device"
|
||||
msgstr "设备升级中。请不要断开电源"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:192
|
||||
msgid "Installed version:"
|
||||
msgstr "安装的版本:"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:92
|
||||
msgid "Keep settings:"
|
||||
msgstr "保持设置:"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:215
|
||||
msgid "No upgrades available"
|
||||
msgstr "没有升级"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:285
|
||||
msgid "Rebooting device - please wait!"
|
||||
msgstr "正在重启设备-请稍候!"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:209
|
||||
msgid "Request firmware"
|
||||
msgstr "请求固件"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:110
|
||||
msgid "Search for upgrades"
|
||||
msgstr "搜索升级"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:165
|
||||
msgid "Searching for upgrades"
|
||||
msgstr "搜索升级"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:103
|
||||
msgid "Server:"
|
||||
msgstr "服务器:"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:289
|
||||
msgid "Success! Please reload web interface"
|
||||
msgstr "成功!请重新加载web界面"
|
||||
|
||||
#: luci-app-sysupgrade/luasrc/view/sysupgrade.htm:76
|
||||
#: luci-app-sysupgrade/root/usr/share/luci/menu.d/luci-app-sysupgrade.json:3
|
||||
msgid "Sysupgrade"
|
||||
msgstr "系统升级"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:320
|
||||
msgid "Upload of firmware failed, please retry by reloading web interface"
|
||||
msgstr "轻松搜索和安装新版本的系统进行升级"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:305
|
||||
msgid "Uploading firmware to device"
|
||||
msgstr "上传固件到设备"
|
||||
|
||||
#: luci-app-sysupgrade/root/www/luci-static/resources/sysupgrade.js:299
|
||||
msgid ""
|
||||
"Web interface could not reconnect to your device. Please reload web "
|
||||
"interface or check device manually"
|
||||
msgstr "网络界面无法重新连接到您的设备。请重新加载web界面或手动检查设备"
|
||||
|
||||
#: luci-app-sysupgrade/root/usr/share/rpcd/acl.d/sysupgrade.json:3
|
||||
msgid "sysupgrade via rpcd and luci"
|
||||
msgstr "通过RPCD和luci进行升级"
|
|
@ -8,25 +8,25 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=modemmanager
|
||||
PKG_SOURCE_VERSION:=1.20.4
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_VERSION:=1.20.6
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
|
||||
#PKG_MIRROR_HASH:=f138effc693456c5040ec22e17c0a8b41143c3b17b62437462995c297a9150dc
|
||||
PKG_MIRROR_HASH:=e90103e2e42bb826bbbac83937a9a69f50348cd6ce0d8da655a12b65494ce7c9
|
||||
|
||||
PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_DEPENDS:=glib2/host libxslt/host
|
||||
PKG_BUILD_FLAGS:=gc-sections
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
TARGET_CFLAGS += -fno-merge-all-constants -fmerge-constants
|
||||
|
||||
define Package/modemmanager/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
|
|
|
@ -272,6 +272,14 @@ mm_report_event() {
|
|||
local subsystem="$3"
|
||||
local sysfspath="$4"
|
||||
|
||||
# Do not save virtual devices
|
||||
local virtual
|
||||
virtual="$(echo "$sysfspath" | cut -d'/' -f4)"
|
||||
[ "$virtual" = "virtual" ] && {
|
||||
mm_log "debug" "sysfspath is a virtual device ($sysfspath)"
|
||||
return
|
||||
}
|
||||
|
||||
# Track/untrack events in cache
|
||||
case "${action}" in
|
||||
"add")
|
||||
|
|
|
@ -343,11 +343,22 @@ proto_modemmanager_init_config() {
|
|||
proto_config_add_string password
|
||||
proto_config_add_string pincode
|
||||
proto_config_add_string iptype
|
||||
proto_config_add_string plmn
|
||||
proto_config_add_int signalrate
|
||||
proto_config_add_boolean lowpower
|
||||
proto_config_add_boolean allow_roaming
|
||||
proto_config_add_defaults
|
||||
}
|
||||
|
||||
# Append param to the global 'connectargs' variable.
|
||||
append_param() {
|
||||
local param="$1"
|
||||
|
||||
[ -z "$param" ] && return
|
||||
[ -z "$connectargs" ] || connectargs="${connectargs},"
|
||||
connectargs="${connectargs}${param}"
|
||||
}
|
||||
|
||||
proto_modemmanager_setup() {
|
||||
local interface="$1"
|
||||
|
||||
|
@ -355,11 +366,11 @@ proto_modemmanager_setup() {
|
|||
local bearermethod_ipv4 bearermethod_ipv6 auth cliauth
|
||||
local operatorname operatorid registration accesstech signalquality
|
||||
|
||||
local device apn allowedauth username password pincode iptype metric signalrate
|
||||
local device apn allowedauth username password pincode iptype plmn metric signalrate allow_roaming
|
||||
|
||||
local address prefix gateway mtu dns1 dns2
|
||||
|
||||
json_get_vars device apn allowedauth username password pincode iptype metric signalrate
|
||||
json_get_vars device apn allowedauth username password pincode iptype plmn metric signalrate allow_roaming
|
||||
|
||||
# validate sysfs path given in config
|
||||
[ -n "${device}" ] || {
|
||||
|
@ -368,11 +379,6 @@ proto_modemmanager_setup() {
|
|||
proto_set_available "${interface}" 0
|
||||
return 1
|
||||
}
|
||||
[ -e "${device}" ] || {
|
||||
echo "Device not found in sysfs"
|
||||
proto_set_available "${interface}" 0
|
||||
return 1
|
||||
}
|
||||
|
||||
# validate that ModemManager is handling the modem at the sysfs path
|
||||
modemstatus=$(mmcli --modem="${device}" --output-keyvalue)
|
||||
|
@ -397,7 +403,24 @@ proto_modemmanager_setup() {
|
|||
echo "starting connection with apn '${apn}'..."
|
||||
proto_notify_error "${interface}" MM_CONNECT_IN_PROGRESS
|
||||
|
||||
connectargs="apn=${apn}${iptype:+,ip-type=${iptype}}${cliauth:+,allowed-auth=${cliauth}}${username:+,user=${username}}${password:+,password=${password}}${pincode:+,pin=${pincode}}"
|
||||
# setup allow-roaming parameter
|
||||
if [ -n "${allow_roaming}" ] && [ "${allow_roaming}" -eq 0 ];then
|
||||
allow_roaming="no"
|
||||
else
|
||||
# allowed unless a user set the opposite
|
||||
allow_roaming="yes"
|
||||
fi
|
||||
|
||||
# Append options to 'connectargs' variable
|
||||
append_param "apn=${apn}"
|
||||
append_param "allow-roaming=${allow_roaming}"
|
||||
append_param "${iptype:+ip-type=${iptype}}"
|
||||
append_param "${plmn:+operator-id=${plmn}}"
|
||||
append_param "${cliauth:+allowed-auth=${cliauth}}"
|
||||
append_param "${username:+user=${username}}"
|
||||
append_param "${password:+password=${password}}"
|
||||
append_param "${pincode:+pin=${pincode}}"
|
||||
|
||||
mmcli --modem="${device}" --timeout 120 --simple-connect="${connectargs}" || {
|
||||
proto_notify_error "${interface}" MM_CONNECT_FAILED
|
||||
proto_block_restart "${interface}"
|
||||
|
@ -509,7 +532,6 @@ proto_modemmanager_teardown() {
|
|||
json_get_vars device lowpower iptype
|
||||
|
||||
echo "stopping network"
|
||||
proto_notify_error "${interface}" MM_TEARDOWN_IN_PROGRESS
|
||||
|
||||
# load connected bearer information, just the first one should be ok
|
||||
modemstatus=$(mmcli --modem="${device}" --output-keyvalue)
|
||||
|
@ -544,6 +566,9 @@ proto_modemmanager_teardown() {
|
|||
# low power, only if requested
|
||||
[ "${lowpower:-0}" -lt 1 ] ||
|
||||
mmcli --modem="${device}" --set-power-state-low
|
||||
|
||||
proto_init_update "*" 0
|
||||
proto_send_update "$interface"
|
||||
}
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
|
|
190
ndpi-netfilter2/patches/002-no-livepatch-required.patch
Executable file
190
ndpi-netfilter2/patches/002-no-livepatch-required.patch
Executable file
|
@ -0,0 +1,190 @@
|
|||
From 9e2bc31b8c330dc6ad0e6e478103652cd72dc3c8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
Date: Sun, 9 Jul 2023 12:22:02 +0600
|
||||
Subject: [PATCH] add ndpi support for arm/arm64 etc. in 6.1
|
||||
|
||||
ndpi is not supported in more recent kernels without livepatch support
|
||||
however. livepatch is only supported for x86_64 architectures.
|
||||
so ndpi cannot be used on any other platform anymore.
|
||||
we solve this by adding a simple hook to nf_ct_destroy
|
||||
|
||||
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
---
|
||||
ndpi-netfilter/kernel-patch/v6.1.38.diff | 81 ++++++++++++++++++++++++
|
||||
ndpi-netfilter/src/main.c | 23 +++++--
|
||||
2 files changed, 98 insertions(+), 6 deletions(-)
|
||||
create mode 100644 ndpi-netfilter/kernel-patch/v6.1.38.diff
|
||||
|
||||
diff --git a/ndpi-netfilter/kernel-patch/v6.1.38.diff b/ndpi-netfilter/kernel-patch/v6.1.38.diff
|
||||
new file mode 100644
|
||||
index 0000000000..6846dc84fc
|
||||
--- /dev/null
|
||||
+++ b/ndpi-netfilter/kernel-patch/v6.1.38.diff
|
||||
@@ -0,0 +1,81 @@
|
||||
+diff -urpN linux-6.1.38.old/include/net/netfilter/nf_conntrack.h linux-6.1.38/include/net/netfilter/nf_conntrack.h
|
||||
+--- linux-6.1.38.old/include/net/netfilter/nf_conntrack.h 2023-07-05 23:27:38.000000000 +0600
|
||||
++++ linux-6.1.38/include/net/netfilter/nf_conntrack.h 2023-07-14 12:34:56.663750711 +0600
|
||||
+@@ -362,6 +362,11 @@ static inline struct nf_conntrack_net *n
|
||||
+ return net_generic(net, nf_conntrack_net_id);
|
||||
+ }
|
||||
+
|
||||
++#ifdef CONFIG_NDPI_HOOK
|
||||
++void register_ndpi_hook(void (*hook)(struct nf_conn *));
|
||||
++void unregister_ndpi_hook(void);
|
||||
++#endif
|
||||
++
|
||||
+ #define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
|
||||
+ #define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
|
||||
+ #define NF_CT_STAT_ADD_ATOMIC(net, count, v) this_cpu_add((net)->ct.stat->count, (v))
|
||||
+diff -urpN linux-6.1.38.old/net/netfilter/Kconfig linux-6.1.38/net/netfilter/Kconfig
|
||||
+--- linux-6.1.38.old/net/netfilter/Kconfig 2023-07-05 23:27:38.000000000 +0600
|
||||
++++ linux-6.1.38/net/netfilter/Kconfig 2023-07-14 12:34:11.966879899 +0600
|
||||
+@@ -76,11 +76,15 @@ config NETFILTER_NETLINK_OSF
|
||||
+ If this option is enabled, the kernel will include support
|
||||
+ for passive OS fingerprint via NFNETLINK.
|
||||
+
|
||||
++config NDPI_HOOK
|
||||
++ bool
|
||||
++
|
||||
+ config NF_CONNTRACK
|
||||
+ tristate "Netfilter connection tracking support"
|
||||
+ default m if NETFILTER_ADVANCED=n
|
||||
+ select NF_DEFRAG_IPV4
|
||||
+ select NF_DEFRAG_IPV6 if IPV6 != n
|
||||
++ select NDPI_HOOK
|
||||
+ help
|
||||
+ Connection tracking keeps a record of what packets have passed
|
||||
+ through your machine, in order to figure out how they are related
|
||||
+diff -urpN linux-6.1.38.old/net/netfilter/nf_conntrack_core.c linux-6.1.38/net/netfilter/nf_conntrack_core.c
|
||||
+--- linux-6.1.38.old/net/netfilter/nf_conntrack_core.c 2023-07-05 23:27:38.000000000 +0600
|
||||
++++ linux-6.1.38/net/netfilter/nf_conntrack_core.c 2023-07-14 12:33:45.580092713 +0600
|
||||
+@@ -582,9 +582,30 @@ static void destroy_gre_conntrack(struct
|
||||
+ #endif
|
||||
+ }
|
||||
+
|
||||
++#ifdef CONFIG_NDPI_HOOK
|
||||
++
|
||||
++static void (*ndpi_hook)(struct nf_conn *) __rcu __read_mostly = NULL;
|
||||
++
|
||||
++void register_ndpi_hook(void (*hook)(struct nf_conn *))
|
||||
++{
|
||||
++ rcu_assign_pointer(ndpi_hook, hook);
|
||||
++}
|
||||
++EXPORT_SYMBOL(register_ndpi_hook);
|
||||
++
|
||||
++void unregister_ndpi_hook(void)
|
||||
++{
|
||||
++ rcu_assign_pointer(ndpi_hook, NULL);
|
||||
++}
|
||||
++
|
||||
++EXPORT_SYMBOL(unregister_ndpi_hook);
|
||||
++#endif
|
||||
++
|
||||
+ void nf_ct_destroy(struct nf_conntrack *nfct)
|
||||
+ {
|
||||
+ struct nf_conn *ct = (struct nf_conn *)nfct;
|
||||
++#ifdef CONFIG_NDPI_HOOK
|
||||
++ void (*hook)(struct nf_conn *);
|
||||
++#endif
|
||||
+
|
||||
+ pr_debug("%s(%p)\n", __func__, ct);
|
||||
+ WARN_ON(refcount_read(&nfct->use) != 0);
|
||||
+@@ -594,6 +615,12 @@ void nf_ct_destroy(struct nf_conntrack *
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
++#ifdef CONFIG_NDPI_HOOK
|
||||
++ hook = rcu_dereference(ndpi_hook);
|
||||
++ if (hook)
|
||||
++ hook(ct);
|
||||
++#endif
|
||||
++
|
||||
+ if (unlikely(nf_ct_protonum(ct) == IPPROTO_GRE))
|
||||
+ destroy_gre_conntrack(ct);
|
||||
+
|
||||
diff --git a/ndpi-netfilter/src/main.c b/ndpi-netfilter/src/main.c
|
||||
index 024ca4bb79..e8ae3912d7 100644
|
||||
--- a/ndpi-netfilter/src/main.c
|
||||
+++ b/ndpi-netfilter/src/main.c
|
||||
@@ -102,7 +102,9 @@ static char proto_name[]="proto";
|
||||
static char debug_name[]="debug";
|
||||
static char risk_name[]="risks";
|
||||
|
||||
-#if LINUX_VERSION_CODE > KERNEL_VERSION(5,19,0)
|
||||
+#ifdef CONFIG_NDPI_HOOK
|
||||
+#define USE_NDPI_HOOK
|
||||
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(5,19,0)
|
||||
#ifndef USE_LIVEPATCH
|
||||
#define USE_LIVEPATCH
|
||||
#endif
|
||||
@@ -162,15 +164,17 @@ static inline const struct net_device *xt_out(const struct xt_action_param *par)
|
||||
// for testing only!
|
||||
// #define USE_CONNLABELS
|
||||
|
||||
-#if !defined(USE_CONNLABELS) && defined(CONFIG_NF_CONNTRACK_CUSTOM) && CONFIG_NF_CONNTRACK_CUSTOM > 0
|
||||
+#if !defined(USE_CONNLABELS) && !defined(USE_NDPI_HOOK) && defined(CONFIG_NF_CONNTRACK_CUSTOM) && CONFIG_NF_CONNTRACK_CUSTOM > 0
|
||||
#define NF_CT_CUSTOM
|
||||
#else
|
||||
+#ifndef USE_NDPI_HOOK
|
||||
#undef NF_CT_CUSTOM
|
||||
#include <net/netfilter/nf_conntrack_labels.h>
|
||||
#ifndef CONFIG_NF_CONNTRACK_LABELS
|
||||
#error NF_CONNTRACK_LABELS not defined
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)
|
||||
#define nf_ct_l3proto_try_module_get(a) 0
|
||||
@@ -3187,7 +3191,7 @@ static int __net_init ndpi_net_init(struct net *net)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
-#ifndef USE_LIVEPATCH
|
||||
+#if !defined(USE_LIVEPATCH) && !defined(USE_NDPI_HOOK)
|
||||
static struct nf_ct_ext_type ndpi_extend = {
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0)
|
||||
.seq_print = seq_print_ndpi,
|
||||
@@ -3197,7 +3201,7 @@ static struct nf_ct_ext_type ndpi_extend = {
|
||||
.align = __alignof__(uint32_t),
|
||||
.id = 0,
|
||||
};
|
||||
-#else
|
||||
+#elif !defined(USE_NDPI_HOOK)
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
|
||||
#error "not implemented"
|
||||
@@ -3266,6 +3270,8 @@ static int __init ndpi_mt_init(void)
|
||||
return -EBUSY;
|
||||
}
|
||||
nf_ct_ext_id_ndpi = ndpi_extend.id;
|
||||
+#elif defined(USE_NDPI_HOOK)
|
||||
+ register_ndpi_hook(&nf_ndpi_free_flow);
|
||||
#else
|
||||
#ifdef USE_LIVEPATCH
|
||||
nf_ct_ext_id_ndpi = NF_CT_EXT_LABELS;
|
||||
@@ -3389,8 +3395,11 @@ static int __init ndpi_mt_init(void)
|
||||
unreg_pernet:
|
||||
unregister_pernet_subsys(&ndpi_net_ops);
|
||||
unreg_ext:
|
||||
-#ifndef USE_LIVEPATCH
|
||||
+#if !defined(USE_LIVEPATCH) && !defined(USE_NDPI_HOOK)
|
||||
nf_ct_extend_unregister(&ndpi_extend);
|
||||
+#endif
|
||||
+#if defined(USE_NDPI_HOOK)
|
||||
+ unregister_ndpi_hook();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
@@ -3401,8 +3410,10 @@ static void __exit ndpi_mt_exit(void)
|
||||
xt_unregister_target(&ndpi_tg_reg);
|
||||
xt_unregister_match(&ndpi_mt_reg);
|
||||
unregister_pernet_subsys(&ndpi_net_ops);
|
||||
-#ifndef USE_LIVEPATCH
|
||||
+#if !defined(USE_LIVEPATCH) && !defined(USE_NDPI_HOOK)
|
||||
nf_ct_extend_unregister(&ndpi_extend);
|
||||
+#elif defined(USE_NDPI_HOOK)
|
||||
+ unregister_ndpi_hook();
|
||||
#else
|
||||
rcu_assign_pointer(nf_conntrack_destroy_cb,NULL);
|
||||
#endif
|
237
ndpi-netfilter2/patches/003-bittorrent-compilation-remove-ipv6.patch
Executable file
237
ndpi-netfilter2/patches/003-bittorrent-compilation-remove-ipv6.patch
Executable file
|
@ -0,0 +1,237 @@
|
|||
--- a/src/lib/protocols/bittorrent.c.old 2023-07-15 11:45:44.566446059 +0200
|
||||
+++ b/src/lib/protocols/bittorrent.c 2023-07-15 11:49:25.498828807 +0200
|
||||
@@ -263,19 +263,6 @@
|
||||
return key % (size-1);
|
||||
}
|
||||
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
-static inline u_int32_t hash_calc6(ndpi_ip_addr_t *ip,u_int16_t port,u_int32_t size) {
|
||||
- u_int32_t M,I;
|
||||
- u_int8_t *ipp = (u_int8_t *)&I;
|
||||
- u_int32_t key;
|
||||
- M=103;
|
||||
- I = ip->ipv6.u6_addr.u6_addr32[0] + ip->ipv6.u6_addr.u6_addr32[1] + ip->ipv6.u6_addr.u6_addr32[2] + ip->ipv6.u6_addr.u6_addr32[3];
|
||||
- key = (((ipp[0] * M) + ipp[1] * M) + ipp[2]) * M +ipp[3];
|
||||
- ipp = (u_int8_t *)&port;
|
||||
- key = ((key * M) + ipp[0] * M) + ipp[1];
|
||||
- return key % (size-1);
|
||||
-}
|
||||
-#endif
|
||||
|
||||
// ndpi_ip_addr_t
|
||||
static struct hash_ip4p_node *hash_ip4p_add(struct hash_ip4p_table *ht,
|
||||
@@ -283,9 +270,6 @@
|
||||
struct hash_ip4p_node *n,*t;
|
||||
|
||||
u_int32_t key =
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- ht->ipv6 ? hash_calc6(ip,port,ht->size) :
|
||||
-#endif
|
||||
hash_calc(ip,port,ht->size);
|
||||
|
||||
n = NULL;
|
||||
@@ -293,22 +277,6 @@
|
||||
spin_lock(&ht->tbl[key].lock);
|
||||
|
||||
n = ht->tbl[key].top;
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- if(ht->ipv6) {
|
||||
- while(n) {
|
||||
- if(!memcmp(&n->ip,ip->ipv6.u6_addr.u6_addr8,16) && n->port == port) {
|
||||
- n->lchg = lchg;
|
||||
- n->flag |= flag;
|
||||
- move_up(&ht->tbl[key],n);
|
||||
- goto unlock;
|
||||
- }
|
||||
- n = n->next;
|
||||
- }
|
||||
- n = BT_N_MALLOC(sizeof(struct hash_ip4p_node)+12);
|
||||
- if(!n) goto unlock;
|
||||
- memcpy(&n->ip,ip->ipv6.u6_addr.u6_addr8,16);
|
||||
- } else {
|
||||
-#endif
|
||||
while(n) {
|
||||
if(n->ip == ip->ipv4 && n->port == port) {
|
||||
n->lchg = lchg;
|
||||
@@ -321,9 +289,6 @@
|
||||
n = BT_N_MALLOC(sizeof(struct hash_ip4p_node));
|
||||
if(!n) goto unlock;
|
||||
n->ip = ip->ipv4;
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- }
|
||||
-#endif
|
||||
t = ht->tbl[key].top;
|
||||
n->next = t;
|
||||
n->prev = NULL;
|
||||
@@ -347,31 +312,16 @@
|
||||
struct hash_ip4p_node *n;
|
||||
|
||||
u_int16_t key =
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- ht->ipv6 ? hash_calc6(ip,port,ht->size) :
|
||||
-#endif
|
||||
hash_calc(ip,port,ht->size);
|
||||
|
||||
n = NULL;
|
||||
spin_lock(&ht->tbl[key].lock);
|
||||
|
||||
n = ht->tbl[key].top;
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- if(ht->ipv6) {
|
||||
- while(n) {
|
||||
- if(!memcmp(&n->ip,ip->ipv6.u6_addr.u6_addr8,16) && n->port == port)
|
||||
- break;
|
||||
- n = n->next;
|
||||
- }
|
||||
- } else {
|
||||
-#endif
|
||||
while(n) {
|
||||
if(n->ip == ip->ipv4 && n->port == port) break;
|
||||
n = n->next;
|
||||
}
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- }
|
||||
-#endif
|
||||
if(n) {
|
||||
#ifdef __KERNEL__
|
||||
diagram(ndpi_btp_tm,sizeof(ndpi_btp_tm)/sizeof(ndpi_btp_tm[0]),lchg - n->lchg);
|
||||
@@ -805,13 +755,6 @@
|
||||
u_int16_t s_port = packet->udp ? packet->udp->source :
|
||||
packet->tcp ? packet->tcp->source : 0;
|
||||
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- if(packet->iphv6)
|
||||
- bt_add_announce(ndpi_struct,
|
||||
- ndpi_struct->bt_ann, ndpi_struct->bt_ann_len,
|
||||
- 1, (ndpi_ip_addr_t *)&packet->iphv6->ip6_src,
|
||||
- s_port, &x.p,p_now);
|
||||
-#endif
|
||||
if(packet->iph)
|
||||
bt_add_announce(ndpi_struct,
|
||||
ndpi_struct->bt_ann, ndpi_struct->bt_ann_len,
|
||||
@@ -819,39 +762,6 @@
|
||||
s_port, &x.p,p_now);
|
||||
}
|
||||
#endif
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
-if(packet->iphv6 && ndpi_struct->bt6_ht) {
|
||||
-NDPI_LOG_DBG2(ndpi_struct,
|
||||
- "BT: detected valid DHT6 %d %d\n",
|
||||
- x.p.r.nn6,x.p.r.nv6);
|
||||
-#ifndef __KERNEL__
|
||||
-if(bt_parse_debug) dump_bt_proto_struct(&x.p);
|
||||
-#endif
|
||||
- if(x.p.r.nodes6 && x.p.r.nn6) {
|
||||
- struct bt_nodes6_data *n = x.p.r.nodes6;
|
||||
- for(i=0; i < x.p.r.nn6; i++,n++) {
|
||||
- hash_ip4p_add(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&n->ip,n->port,p_now,0x2);
|
||||
-
|
||||
- NDPI_LOG_DBG2(ndpi_struct,
|
||||
- "BT: nodes6 add DHT peer %s:%d\n",
|
||||
- inet_ntop(AF_INET6,(void *)&n->ip, ip6buf,sizeof(ip6buf)),
|
||||
- htons(n->port));
|
||||
- }
|
||||
- }
|
||||
- if(x.p.r.values6 && x.p.r.nv6) {
|
||||
- struct bt_ipv6p2 *n = (struct bt_ipv6p2 *)x.p.r.values6;
|
||||
- for(i=0; i < x.p.r.nv6; i++,n++) {
|
||||
- hash_ip4p_add(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&n->d.ip,n->d.port,p_now,0x4);
|
||||
-
|
||||
- NDPI_LOG_DBG2(ndpi_struct,
|
||||
- "BT: values6 add DHT peer %s:%d\n",
|
||||
- inet_ntop(AF_INET6,(void *)&n->d.ip, ip6buf,sizeof(ip6buf)),
|
||||
- htons(n->d.port));
|
||||
- }
|
||||
- }
|
||||
- return r >= 0;
|
||||
-}
|
||||
-#endif
|
||||
|
||||
if(!ndpi_struct->bt_ht) return r >= 0;
|
||||
|
||||
@@ -899,16 +809,6 @@
|
||||
static void ndpi_bt_add_peer_cache(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_packet_struct *packet, uint16_t p_src, uint16_t p_dst) {
|
||||
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- if(ndpi_struct->bt6_ht && packet->iphv6) {
|
||||
- if(packet->packet_direction)
|
||||
- hash_ip4p_add(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&packet->iphv6->ip6_src,
|
||||
- p_src, packet->current_time,1);
|
||||
- else
|
||||
- hash_ip4p_add(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&packet->iphv6->ip6_dst,
|
||||
- p_dst, packet->current_time,1);
|
||||
- } else
|
||||
-#endif
|
||||
if(ndpi_struct->bt_ht && packet->iph) {
|
||||
if(packet->packet_direction)
|
||||
hash_ip4p_add(ndpi_struct->bt_ht,(ndpi_ip_addr_t *)&packet->iph->saddr,
|
||||
@@ -1073,19 +973,6 @@
|
||||
if(!packet->tcp) return 0;
|
||||
source = packet->tcp->source;
|
||||
dest = packet->tcp->dest;
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- if(ndpi_struct->bt6_ht && packet->iphv6) {
|
||||
- f1 = hash_ip4p_find(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&packet->iphv6->ip6_src,source,
|
||||
- packet->current_time);
|
||||
- f2 = hash_ip4p_find(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&packet->iphv6->ip6_dst,dest,
|
||||
- packet->current_time);
|
||||
-#ifdef __KERNEL__
|
||||
- if(f1) ndpi_ptss++;
|
||||
- if(f2) ndpi_ptdd++;
|
||||
-#endif
|
||||
- return f1 != NULL || f2 != NULL;
|
||||
- }
|
||||
-#endif
|
||||
if(ndpi_struct->bt_ht && packet->iph) {
|
||||
f1 = hash_ip4p_find(ndpi_struct->bt_ht,(ndpi_ip_addr_t *)&packet->iph->saddr,source,
|
||||
packet->current_time);
|
||||
@@ -1110,23 +997,6 @@
|
||||
if(!packet->udp) return 0;
|
||||
source = packet->udp->source;
|
||||
dest = packet->udp->dest;
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- if(ndpi_struct->bt6_ht && packet->iphv6) {
|
||||
- f1 = hash_ip4p_find(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&packet->iphv6->ip6_src,source,
|
||||
- packet->current_time);
|
||||
- f2 = hash_ip4p_find(ndpi_struct->bt6_ht,(ndpi_ip_addr_t *)&packet->iphv6->ip6_dst,dest,
|
||||
- packet->current_time);
|
||||
-#ifdef __KERNEL__
|
||||
- if(f1) {
|
||||
- DIRC(ndpi_pusr,ndpi_pusf);
|
||||
- }
|
||||
- if(f2) {
|
||||
- DIRC(ndpi_pudr,ndpi_pudf);
|
||||
- }
|
||||
-#endif
|
||||
- return f1 != NULL || f2 != NULL;
|
||||
- }
|
||||
-#endif
|
||||
if(ndpi_struct->bt_ht && packet->iph) {
|
||||
f1 = hash_ip4p_find(ndpi_struct->bt_ht,(ndpi_ip_addr_t *)&packet->iph->saddr,source,
|
||||
packet->current_time);
|
||||
@@ -1653,11 +1523,6 @@
|
||||
u_int32_t size,u_int32_t size6,u_int32_t tmo,int logsize) {
|
||||
|
||||
ndpi_struct->bt_ht = hash_ip4p_init(size);
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
- ndpi_struct->bt6_ht = hash_ip4p_init(size6);
|
||||
- if(ndpi_struct->bt6_ht)
|
||||
- ndpi_struct->bt6_ht->ipv6=1;
|
||||
-#endif
|
||||
ndpi_bt_node_expire = tmo;
|
||||
#ifdef BT_ANNOUNCE
|
||||
if(logsize > 0) {
|
||||
@@ -1679,12 +1544,6 @@
|
||||
hash_ip4p_del(ndpi_struct->bt_ht);
|
||||
ndpi_struct->bt_ht = NULL;
|
||||
}
|
||||
-#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
-if(ndpi_struct->bt6_ht) {
|
||||
- hash_ip4p_del(ndpi_struct->bt6_ht);
|
||||
- ndpi_struct->bt6_ht = NULL;
|
||||
-}
|
||||
-#endif
|
||||
}
|
||||
|
||||
void init_bittorrent_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
0
r8125/Makefile
Normal file → Executable file
0
r8125/Makefile
Normal file → Executable file
0
r8125/patches/021-6.1-suppot.patch
Normal file → Executable file
0
r8125/patches/021-6.1-suppot.patch
Normal file → Executable file
0
r8152/Makefile
Normal file → Executable file
0
r8152/Makefile
Normal file → Executable file
0
r8152/patches/010-5.19-support.patch
Normal file → Executable file
0
r8152/patches/010-5.19-support.patch
Normal file → Executable file
0
r8152/patches/020-6.1-support.patch
Normal file → Executable file
0
r8152/patches/020-6.1-support.patch
Normal file → Executable file
0
r8168/Makefile
Normal file → Executable file
0
r8168/Makefile
Normal file → Executable file
0
r8168/patches/001-r8168-add-LED-configuration-from-OF.patch
Normal file → Executable file
0
r8168/patches/001-r8168-add-LED-configuration-from-OF.patch
Normal file → Executable file
0
r8168/patches/030-6.1-support.patch
Normal file → Executable file
0
r8168/patches/030-6.1-support.patch
Normal file → Executable file
|
@ -40,11 +40,11 @@ endef
|
|||
CONFIGURE_ARGS += --without-rpm \
|
||||
--without-nss --without-avahi --without-dyninst \
|
||||
--disable-server --disable-grapher --enable-prologues \
|
||||
--without-python2-probes --disable-translator \
|
||||
--without-python2-probes \
|
||||
--disable-libvirt --disable-sqlite --disable-monitor --without-python3-probes \
|
||||
ac_cv_prog_have_javac=no \
|
||||
ac_cv_prog_have_jar=no
|
||||
|
||||
# --disable-translator
|
||||
HOST_CONFIGURE_ARGS += --without-rpm \
|
||||
--without-nss --without-avahi --without-dyninst \
|
||||
--disable-server --disable-grapher --enable-prologues \
|
||||
|
|
11
systemtap/patches/replace-open64.patch
Normal file
11
systemtap/patches/replace-open64.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/setupdwfl.cxx 2023-07-26 20:22:35.427807372 +0200
|
||||
+++ b/setupdwfl.cxx 2023-07-26 20:22:43.855666830 +0200
|
||||
@@ -762,7 +762,7 @@
|
||||
clog << _("Attempting to extract kernel debuginfo build ID from /sys/kernel/notes") << endl;
|
||||
|
||||
const char *notesfile = "/sys/kernel/notes";
|
||||
- int fd = open64 (notesfile, O_RDONLY);
|
||||
+ int fd = open (notesfile, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return "";
|
||||
|
|
@ -1944,6 +1944,16 @@ clear_transparent_proxy() {
|
|||
fi
|
||||
}
|
||||
|
||||
version_over_5_4() {
|
||||
MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
|
||||
MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}')
|
||||
if [ $MAJOR_VERSION -ge 5 ] && [ $MINOR_VERSION -gt 13 ] || [ $MAJOR_VERSION -gt 5 ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start_instance() {
|
||||
local section="$1"
|
||||
|
||||
|
@ -2055,9 +2065,13 @@ start_instance() {
|
|||
fi
|
||||
fi
|
||||
|
||||
TRANSPARENT_PROXY_EXPECTED=1
|
||||
PROG="$NAME.$section"
|
||||
|
||||
procd_open_instance "$NAME.$section"
|
||||
TRANSPARENT_PROXY_EXPECTED=1
|
||||
if version_over_5_4; then
|
||||
PROG="mptcpize run ${PROG}"
|
||||
fi
|
||||
procd_open_instance "$PROG"
|
||||
procd_set_param command "$v2ray_file"
|
||||
procd_append_param command run
|
||||
procd_append_param command -config "$temp_config"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue