mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add x86_64 kernel 6.11 support
This commit is contained in:
parent
38e052ca4c
commit
d35fc5c104
174 changed files with 35677 additions and 2 deletions
127
6.11/package/boot/uboot-envtools/files/mediatek_filogic
Normal file
127
6.11/package/boot/uboot-envtools/files/mediatek_filogic
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ax59u)
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
|
||||
;;
|
||||
bananapi,bpi-r3)
|
||||
rootdev="$(cmdline_get_var root)"
|
||||
rootdev="${rootdev##*/}"
|
||||
rootdev="${rootdev%%p[0-9]*}"
|
||||
case "$rootdev" in
|
||||
mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" $rootdev)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
mtd*)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x20000" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
ubi*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cmcc,rax3000m)
|
||||
case "$(cmdline_get_var root)" in
|
||||
/dev/mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cetron,ct3003|\
|
||||
netgear,wax220|\
|
||||
zbtlink,zbt-z8102ax|\
|
||||
z8102ax-128m|\
|
||||
z8102ax-64m|\
|
||||
zbtlink,zbt-z8103ax)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
h3c,magic-nx30-pro|\
|
||||
jcg,q30-pro|\
|
||||
qihoo,360t7|\
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6086|\
|
||||
tplink,tl-xdr6088|\
|
||||
xiaomi,mi-router-ax3000t-ubootmod|\
|
||||
xiaomi,mi-router-wr30u-ubootmod|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
glinet,gl-mt2500|\
|
||||
glinet,gl-mt6000)
|
||||
local envdev=$(find_mmc_part "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
|
||||
;;
|
||||
glinet,gl-mt3000)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
|
||||
;;
|
||||
mercusys,mr90x-v1|\
|
||||
routerich,ax3000)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
ubnt,unifi-6-plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-wr30u-112m-nmbm|\
|
||||
xiaomi,mi-router-wr30u-stock|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
zyxel,ex5601-t0)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x40000" "2"
|
||||
;;
|
||||
zyxel,ex5601-t0-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
zyxel,ex5700-telenor)
|
||||
ubootenv_add_uci_config "/dev/ubootenv" "0x0" "0x4000" "0x4000" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config
|
||||
|
||||
exit 0
|
||||
1740
6.11/package/boot/uboot-mediatek/patches/900-add-z8102ax.patch
Normal file
1740
6.11/package/boot/uboot-mediatek/patches/900-add-z8102ax.patch
Normal file
File diff suppressed because it is too large
Load diff
723
6.11/package/kernel/linux/modules/fs.mk
Normal file
723
6.11/package/kernel/linux/modules/fs.mk
Normal file
|
|
@ -0,0 +1,723 @@
|
|||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
FS_MENU:=Filesystems
|
||||
|
||||
define KernelPackage/fs-9p
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Plan 9 Resource Sharing Support
|
||||
DEPENDS:=+kmod-9pnet +LINUX_6_1:kmod-fs-netfs +LINUX_6_6:kmod-fs-netfs
|
||||
KCONFIG:=\
|
||||
CONFIG_9P_FS \
|
||||
CONFIG_9P_FS_POSIX_ACL=n \
|
||||
CONFIG_9P_FS_SECURITY=n \
|
||||
CONFIG_9P_FSCACHE=n
|
||||
FILES:=$(LINUX_DIR)/fs/9p/9p.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,9p)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-9p/description
|
||||
Kernel module for Plan 9 Resource Sharing Support support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-9p))
|
||||
|
||||
|
||||
define KernelPackage/fs-afs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Andrew FileSystem client
|
||||
DEFAULT:=n
|
||||
DEPENDS:=+kmod-rxrpc +kmod-dnsresolver +kmod-fs-fscache
|
||||
KCONFIG:=\
|
||||
CONFIG_AFS_FS=m \
|
||||
CONFIG_AFS_DEBUG=n \
|
||||
CONFIG_AFS_FSCACHE=y
|
||||
FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,kafs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-afs/description
|
||||
Kernel module for Andrew FileSystem client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-afs))
|
||||
|
||||
define KernelPackage/fs-autofs4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=AUTOFS4 filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_AUTOFS4_FS \
|
||||
CONFIG_AUTOFS_FS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/autofs/autofs4.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,autofs4)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-autofs4/description
|
||||
Kernel module for AutoFS4 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-autofs4))
|
||||
|
||||
|
||||
define KernelPackage/fs-btrfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=BTRFS filesystem support
|
||||
DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd
|
||||
KCONFIG:=\
|
||||
CONFIG_BTRFS_FS \
|
||||
CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/fs/btrfs/btrfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,btrfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-btrfs/description
|
||||
Kernel module for BTRFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-btrfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-smbfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SMBFS common dependencies support
|
||||
HIDDEN:=1
|
||||
DEPENDS:=+LINUX_6_6:kmod-fs-netfs +LINUX_6_6:kmod-nls-ucs2-utils
|
||||
KCONFIG:=\
|
||||
CONFIG_SMBFS_COMMON@lt6.1 \
|
||||
CONFIG_SMBFS@ge6.1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/common/cifs_arc4.ko@ge6.1 \
|
||||
$(LINUX_DIR)/fs/smb/common/cifs_md4.ko@ge6.1
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-smbfs-common/description
|
||||
Kernel module dependency for CIFS or SMB_SERVER support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-smbfs-common))
|
||||
|
||||
|
||||
define KernelPackage/fs-cifs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=CIFS support
|
||||
KCONFIG:= \
|
||||
CONFIG_CIFS \
|
||||
CONFIG_CIFS_DFS_UPCALL=n \
|
||||
CONFIG_CIFS_UPCALL=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/cifs/cifs.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/client/cifs.ko@ge6.1
|
||||
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
||||
$(call AddDepends/nls)
|
||||
DEPENDS+= \
|
||||
+kmod-fs-smbfs-common \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-dnsresolver
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cifs/description
|
||||
Kernel module for CIFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cifs))
|
||||
|
||||
|
||||
define KernelPackage/fs-configfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Configuration filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_CONFIGFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/configfs/configfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,configfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-configfs/description
|
||||
Kernel module for configfs support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-configfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-cramfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Compressed RAM/ROM filesystem support
|
||||
DEPENDS:=+kmod-lib-zlib-inflate
|
||||
KCONFIG:= \
|
||||
CONFIG_CRAMFS
|
||||
FILES:=$(LINUX_DIR)/fs/cramfs/cramfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,cramfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cramfs/description
|
||||
Kernel module for cramfs support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cramfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-efivarfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=efivar filesystem support
|
||||
KCONFIG:=CONFIG_EFIVAR_FS
|
||||
FILES:=$(LINUX_DIR)/fs/efivarfs/efivarfs.ko
|
||||
DEPENDS:=@(x86_64||x86)
|
||||
AUTOLOAD:=$(call Autoload,90,efivarfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-efivarfs/description
|
||||
Kernel module to support efivarfs file system mountpoint.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-efivarfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-exfat
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=exFAT filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_EXFAT_FS \
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
FILES:= $(LINUX_DIR)/fs/exfat/exfat.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,exfat,1)
|
||||
DEPENDS:=+kmod-nls-base
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-exfat/description
|
||||
Kernel module for exFAT filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-exfat))
|
||||
|
||||
|
||||
define KernelPackage/fs-exportfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=exportfs kernel server support
|
||||
KCONFIG:=CONFIG_EXPORTFS
|
||||
FILES=$(LINUX_DIR)/fs/exportfs/exportfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,exportfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-exportfs/description
|
||||
Kernel module for exportfs. Needed for some other modules.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-exportfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ext4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=EXT4 filesystem support
|
||||
DEPENDS := \
|
||||
+kmod-lib-crc16 \
|
||||
+kmod-crypto-hash \
|
||||
+kmod-crypto-crc32c
|
||||
KCONFIG:= \
|
||||
CONFIG_EXT4_FS \
|
||||
CONFIG_EXT4_ENCRYPTION=n \
|
||||
CONFIG_JBD2
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ext4/ext4.ko \
|
||||
$(LINUX_DIR)/fs/jbd2/jbd2.ko \
|
||||
$(LINUX_DIR)/fs/mbcache.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,mbcache jbd2 ext4,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ext4/description
|
||||
Kernel module for EXT4 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ext4))
|
||||
|
||||
|
||||
define KernelPackage/fs-f2fs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=F2FS filesystem support
|
||||
DEPENDS:= +kmod-crypto-hash +kmod-crypto-crc32 +kmod-nls-base
|
||||
KCONFIG:=CONFIG_F2FS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/f2fs/f2fs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,f2fs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-f2fs/description
|
||||
Kernel module for F2FS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-f2fs))
|
||||
|
||||
|
||||
#define KernelPackage/fs-fscache
|
||||
# SUBMENU:=$(FS_MENU)
|
||||
# TITLE:=General filesystem local cache manager
|
||||
# DEPENDS:=+kmod-fs-netfs
|
||||
# KCONFIG:=\
|
||||
# CONFIG_FSCACHE \
|
||||
# CONFIG_FSCACHE_STATS=y \
|
||||
# CONFIG_FSCACHE_HISTOGRAM=n \
|
||||
# CONFIG_FSCACHE_DEBUG=n \
|
||||
# CONFIG_FSCACHE_OBJECT_LIST=n \
|
||||
# CONFIG_CACHEFILES \
|
||||
# CONFIG_CACHEFILES_DEBUG=n \
|
||||
# CONFIG_CACHEFILES_HISTOGRAM=n \
|
||||
# CONFIG_CACHEFILES_ERROR_INJECTION=n@ge5.17 \
|
||||
# CONFIG_CACHEFILES_ONDEMAND=n@ge5.19
|
||||
# FILES:= \
|
||||
# $(LINUX_DIR)/fs/fscache/fscache.ko \
|
||||
# $(LINUX_DIR)/fs/cachefiles/cachefiles.ko
|
||||
# AUTOLOAD:=$(call AutoLoad,29,fscache cachefiles)
|
||||
#endef
|
||||
|
||||
#$(eval $(call KernelPackage,fs-fscache))
|
||||
|
||||
|
||||
define KernelPackage/fs-hfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=HFS filesystem support
|
||||
DEPENDS:=+kmod-cdrom
|
||||
KCONFIG:=CONFIG_HFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/hfs/hfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,hfs)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-hfs/description
|
||||
Kernel module for HFS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-hfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-hfsplus
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=HFS+ filesystem support
|
||||
DEPENDS:=+kmod-cdrom
|
||||
KCONFIG:=CONFIG_HFSPLUS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/hfsplus/hfsplus.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,hfsplus)
|
||||
$(call AddDepends/nls,utf8)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-hfsplus/description
|
||||
Kernel module for HFS+ filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-hfsplus))
|
||||
|
||||
|
||||
define KernelPackage/fs-isofs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=ISO9660 filesystem support
|
||||
DEPENDS:=+kmod-lib-zlib-inflate +kmod-cdrom
|
||||
KCONFIG:=CONFIG_ISO9660_FS CONFIG_JOLIET=y CONFIG_ZISOFS=n
|
||||
FILES:=$(LINUX_DIR)/fs/isofs/isofs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,isofs)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-isofs/description
|
||||
Kernel module for ISO9660 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-isofs))
|
||||
|
||||
|
||||
define KernelPackage/fs-jfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=JFS filesystem support
|
||||
KCONFIG:=CONFIG_JFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/jfs/jfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,jfs,1)
|
||||
DEPENDS:=+LINUX_6_6:kmod-nls-ucs2-utils
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-jfs/description
|
||||
Kernel module for JFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-jfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ksmbd
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SMB kernel server support
|
||||
DEPENDS:= \
|
||||
+kmod-nls-base \
|
||||
+kmod-nls-utf8 \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-gcm \
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-fs-smbfs-common
|
||||
KCONFIG:= \
|
||||
CONFIG_SMB_SERVER \
|
||||
CONFIG_SMB_SERVER_SMBDIRECT=n \
|
||||
CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=n \
|
||||
CONFIG_SMB_SERVER_KERBEROS5=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ksmbd/ksmbd.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/server/ksmbd.ko@ge6.1
|
||||
AUTOLOAD:=$(call AutoLoad,41,ksmbd)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ksmbd/description
|
||||
Kernel module for SMB kernel server support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ksmbd))
|
||||
|
||||
|
||||
define KernelPackage/fs-minix
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Minix filesystem support
|
||||
KCONFIG:=CONFIG_MINIX_FS
|
||||
FILES:=$(LINUX_DIR)/fs/minix/minix.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,minix)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-minix/description
|
||||
Kernel module for Minix filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-minix))
|
||||
|
||||
|
||||
define KernelPackage/fs-msdos
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=MSDOS filesystem support
|
||||
DEPENDS:=+kmod-fs-vfat
|
||||
KCONFIG:=CONFIG_MSDOS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/fat/msdos.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,msdos)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-msdos/description
|
||||
Kernel module for MSDOS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-msdos))
|
||||
|
||||
|
||||
define KernelPackage/fs-netfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Network Filesystems support
|
||||
KCONFIG:= CONFIG_NETFS_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,netfs)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-netfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs-common +kmod-dnsresolver
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_FS \
|
||||
CONFIG_NFS_USE_LEGACY_DNS=n \
|
||||
CONFIG_NFS_USE_NEW_IDMAPPER=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,nfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs/description
|
||||
Kernel module for NFS client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Common NFS filesystem modules
|
||||
DEPENDS:=+kmod-oid-registry
|
||||
KCONFIG:= \
|
||||
CONFIG_LOCKD \
|
||||
CONFIG_SUNRPC \
|
||||
CONFIG_GRACE_PERIOD \
|
||||
CONFIG_NFS_V4=y \
|
||||
CONFIG_NFS_V4_1=y \
|
||||
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" \
|
||||
CONFIG_NFS_V4_1_MIGRATION=n \
|
||||
CONFIG_NFS_V4_2=y \
|
||||
CONFIG_NFS_V4_2_READ_PLUS=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/lockd/lockd.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/sunrpc.ko \
|
||||
$(LINUX_DIR)/fs/nfs_common/grace.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,grace sunrpc lockd)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-common))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS Secure RPC
|
||||
DEPENDS:= \
|
||||
+kmod-fs-nfs-common \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-cbc \
|
||||
+kmod-crypto-cts \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha1 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-arc4
|
||||
KCONFIG:= \
|
||||
CONFIG_SUNRPC_GSS \
|
||||
CONFIG_RPCSEC_GSS_KRB5
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/rpcsec_gss_krb5.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,auth_rpcgss rpcsec_gss_krb5)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec/description
|
||||
Kernel modules for NFS Secure RPC
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-common-rpcsec))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-v3
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS3 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfsv3.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,nfsv3)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-v3/description
|
||||
Kernel module for NFS v3 client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-v3))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-v4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS4 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_V4=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfsv4.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,nfsv4)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-v4/description
|
||||
Kernel module for NFS v4 client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-v4))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfsd
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS kernel server support
|
||||
DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs +kmod-fs-nfs-common-rpcsec
|
||||
KCONFIG:= \
|
||||
CONFIG_NFSD \
|
||||
CONFIG_NFSD_V4=y \
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=n \
|
||||
CONFIG_NFSD_BLOCKLAYOUT=n \
|
||||
CONFIG_NFSD_SCSILAYOUT=n \
|
||||
CONFIG_NFSD_FLEXFILELAYOUT=n \
|
||||
CONFIG_NFSD_FAULT_INJECTION=n \
|
||||
CONFIG_NFSD_V4_2_INTER_SSC=n
|
||||
FILES:=$(LINUX_DIR)/fs/nfsd/nfsd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,nfsd)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfsd/description
|
||||
Kernel module for NFS kernel server support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfsd))
|
||||
|
||||
|
||||
#define KernelPackage/fs-ntfs
|
||||
# SUBMENU:=$(FS_MENU)
|
||||
# TITLE:=NTFS filesystem read-only (old driver) support
|
||||
# KCONFIG:=CONFIG_NTFS_FS
|
||||
# FILES:=$(LINUX_DIR)/fs/ntfs/ntfs.ko
|
||||
# AUTOLOAD:=$(call AutoLoad,30,ntfs)
|
||||
# $(call AddDepends/nls)
|
||||
#endef
|
||||
|
||||
#define KernelPackage/fs-ntfs/description
|
||||
# Kernel module for limited NTFS filesystem support. Support for writing
|
||||
# is extremely limited and disabled as a result.
|
||||
#endef
|
||||
|
||||
#$(eval $(call KernelPackage,fs-ntfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ntfs3
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NTFS filesystem read & write (new driver) support
|
||||
KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y
|
||||
FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko
|
||||
$(call AddDepends/nls)
|
||||
AUTOLOAD:=$(call AutoLoad,80,ntfs3)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ntfs3/description
|
||||
Kernel module for fully functional NTFS filesystem support. It allows
|
||||
reading as well as writing.
|
||||
|
||||
It supports NTFS versions up to 3.1.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ntfs3))
|
||||
|
||||
|
||||
define KernelPackage/fs-reiserfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=ReiserFS filesystem support
|
||||
KCONFIG:=CONFIG_REISERFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/reiserfs/reiserfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,reiserfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-reiserfs/description
|
||||
Kernel module for ReiserFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-reiserfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-squashfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SquashFS 4.0 filesystem support
|
||||
KCONFIG:=CONFIG_SQUASHFS \
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
FILES:=$(LINUX_DIR)/fs/squashfs/squashfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,squashfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-squashfs/description
|
||||
Kernel module for SquashFS 4.0 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-squashfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-udf
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=UDF filesystem support
|
||||
KCONFIG:=CONFIG_UDF_FS
|
||||
FILES:=$(LINUX_DIR)/fs/udf/udf.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,udf)
|
||||
DEPENDS:=+kmod-lib-crc-itu-t +kmod-cdrom
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-udf/description
|
||||
Kernel module for UDF filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-udf))
|
||||
|
||||
|
||||
define KernelPackage/fs-vfat
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=VFAT filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_FAT_FS \
|
||||
CONFIG_VFAT_FS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/fat/fat.ko \
|
||||
$(LINUX_DIR)/fs/fat/vfat.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,fat vfat,1)
|
||||
$(call AddDepends/nls,cp437 iso8859-1 utf8)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-vfat/description
|
||||
Kernel module for VFAT filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-vfat))
|
||||
|
||||
|
||||
define KernelPackage/fs-xfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=XFS filesystem support
|
||||
KCONFIG:=CONFIG_XFS_FS
|
||||
DEPENDS:= +kmod-fs-exportfs +kmod-lib-crc32c
|
||||
FILES:=$(LINUX_DIR)/fs/xfs/xfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,xfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-xfs/description
|
||||
Kernel module for XFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-xfs))
|
||||
|
||||
|
||||
define KernelPackage/fuse
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=FUSE (Filesystem in Userspace) support
|
||||
KCONFIG:= CONFIG_FUSE_FS
|
||||
FILES:=$(LINUX_DIR)/fs/fuse/fuse.ko
|
||||
AUTOLOAD:=$(call AutoLoad,80,fuse)
|
||||
endef
|
||||
|
||||
define KernelPackage/fuse/description
|
||||
Kernel module for userspace filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fuse))
|
||||
|
||||
|
||||
define KernelPackage/pstore
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Pstore file system
|
||||
DEFAULT:=m if ALL_KMODS
|
||||
KCONFIG:= \
|
||||
CONFIG_PSTORE \
|
||||
CONFIG_PSTORE_COMPRESS=y \
|
||||
CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" \
|
||||
CONFIG_PSTORE_DEFLATE_COMPRESS=y \
|
||||
CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
|
||||
FILES:= $(LINUX_DIR)/fs/pstore/pstore.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,pstore,1)
|
||||
DEPENDS:=+LINUX_6_6:kmod-lib-zlib-deflate +LINUX_6_6:kmod-lib-zlib-inflate
|
||||
endef
|
||||
|
||||
define KernelPackage/pstore/description
|
||||
Kernel module for pstore filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pstore))
|
||||
1269
6.11/package/kernel/linux/modules/video.mk
Normal file
1269
6.11/package/kernel/linux/modules/video.mk
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,11 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/gpio.c 2024-09-16 14:38:11.938379419 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c 2024-09-16 14:38:30.390115635 +0200
|
||||
@@ -111,7 +111,7 @@
|
||||
gc->gchip.get = ath9k_gpio_pin_get;
|
||||
gc->gchip.set = ath9k_gpio_pin_set;
|
||||
|
||||
- if (gpiochip_add(&gc->gchip)) {
|
||||
+ if (gpiochip_add_data(&gc->gchip, NULL)) {
|
||||
kfree(gc);
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
--- a/backport-include/linux/acpi_amd_wbrf.h 2024-09-13 14:55:36.816379630 +0200
|
||||
+++ b/backport-include/linux/acpi_amd_wbrf.h 2024-09-13 14:55:47.792224160 +0200
|
||||
@@ -7,9 +7,6 @@
|
||||
#ifndef _ACPI_AMD_WBRF_H
|
||||
#define _ACPI_AMD_WBRF_H
|
||||
|
||||
-#if LINUX_VERSION_IS_GEQ(6,8,0)
|
||||
-#include_next <linux/acpi_amd_wbrf.h>
|
||||
-#else
|
||||
#include <linux/device.h>
|
||||
#include <linux/notifier.h>
|
||||
|
||||
@@ -82,5 +79,4 @@
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
-#endif /* >=6,8,0 */
|
||||
#endif /* _ACPI_AMD_WBRF_H */
|
||||
|
|
@ -0,0 +1,541 @@
|
|||
--- a/net/wireless/trace.h 2024-09-13 13:11:10.145025393 +0200
|
||||
+++ b/net/wireless/trace.h 2024-09-13 13:14:21.774308452 +0200
|
||||
@@ -372,7 +372,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
WIPHY_ASSIGN;
|
||||
- __assign_str(vir_intf_name, name ? name : "<noname>");
|
||||
+ __assign_str(vir_intf_name);
|
||||
__entry->type = type;
|
||||
),
|
||||
TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
|
||||
--- a/net/mac80211/trace.h 2024-09-13 13:27:20.887264216 +0200
|
||||
+++ b/net/mac80211/trace.h 2024-09-13 13:29:33.057391014 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
__string(vif_name, sdata->name)
|
||||
#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
|
||||
__entry->p2p = sdata->vif.p2p; \
|
||||
- __assign_str(vif_name, sdata->name)
|
||||
+ __assign_str(vif_name)
|
||||
#define VIF_PR_FMT " vif:%s(%d%s)"
|
||||
#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
|
||||
|
||||
--- a/drivers/bus/mhi/host/trace.h 2024-09-13 13:31:32.207702337 +0200
|
||||
+++ b/drivers/bus/mhi/host/trace.h 2024-09-13 13:32:22.330991957 +0200
|
||||
@@ -103,7 +103,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->ch_num = mhi_chan->chan;
|
||||
__entry->wp = mhi_tre;
|
||||
__entry->tre_ptr = mhi_tre->ptr;
|
||||
@@ -131,7 +131,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->local_ee = mhi_cntrl->ee;
|
||||
__entry->state = mhi_cntrl->dev_state;
|
||||
__entry->dev_ee = dev_ee;
|
||||
@@ -158,7 +158,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
if (pm_state)
|
||||
pm_state = __fls(pm_state);
|
||||
__entry->pm_state = pm_state;
|
||||
@@ -184,7 +184,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->rp = rp;
|
||||
__entry->ptr = rp->ptr;
|
||||
__entry->dword0 = rp->dword[0];
|
||||
@@ -226,7 +226,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->ch_num = mhi_chan->chan;
|
||||
__entry->state = state;
|
||||
__entry->reason = reason;
|
||||
@@ -265,7 +265,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->state = state;
|
||||
),
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/trace.h 2024-09-13 13:31:32.087704038 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath10k/trace.h 2024-09-13 13:35:37.760222205 +0200
|
||||
@@ -55,8 +55,8 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk(
|
||||
@@ -92,8 +92,8 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->level = level;
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
@@ -121,10 +121,10 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
- __assign_str(msg, msg);
|
||||
- __assign_str(prefix, prefix);
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
+ __assign_str(msg);
|
||||
+ __assign_str(prefix);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
@@ -152,8 +152,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -182,8 +182,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -211,8 +211,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
@@ -239,8 +239,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->hw_type = ar->hw_rev;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -269,8 +269,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->hw_type = ar->hw_rev;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
@@ -301,8 +301,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->msdu_id = msdu_id;
|
||||
__entry->msdu_len = msdu_len;
|
||||
__entry->vdev_id = vdev_id;
|
||||
@@ -332,8 +332,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->msdu_id = msdu_id;
|
||||
),
|
||||
|
||||
@@ -358,8 +358,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = ath10k_frm_hdr_len(data, len);
|
||||
memcpy(__get_dynamic_array(data), data, __entry->len);
|
||||
),
|
||||
@@ -386,8 +386,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len - ath10k_frm_hdr_len(data, len);
|
||||
memcpy(__get_dynamic_array(payload),
|
||||
data + ath10k_frm_hdr_len(data, len), __entry->len);
|
||||
@@ -435,8 +435,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->hw_type = ar->hw_rev;
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(rxdesc), data, len);
|
||||
@@ -472,8 +472,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->type = type;
|
||||
__entry->timestamp = timestamp;
|
||||
__entry->code = code;
|
||||
@@ -505,8 +505,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
--- a/drivers/net/wireless/ath/ath11k/trace.h 2024-09-13 13:31:32.047704605 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath11k/trace.h 2024-09-13 13:37:29.026645264 +0200
|
||||
@@ -48,8 +48,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->buf_len = buf_len;
|
||||
__entry->pktlog_checksum = pktlog_checksum;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
@@ -77,8 +77,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(ppdu), data, len);
|
||||
),
|
||||
@@ -105,8 +105,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
__entry->log_type = log_type;
|
||||
memcpy(__get_dynamic_array(rxdesc), data, len);
|
||||
@@ -130,8 +130,8 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk(
|
||||
@@ -171,8 +171,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -201,8 +201,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -230,8 +230,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->level = level;
|
||||
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
|
||||
ATH11K_MSG_MAX, vaf->fmt,
|
||||
@@ -262,10 +262,10 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
- __assign_str(msg, msg);
|
||||
- __assign_str(prefix, prefix);
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
+ __assign_str(msg);
|
||||
+ __assign_str(prefix);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
@@ -292,8 +292,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
@@ -318,8 +318,8 @@
|
||||
__field(u32, peer_ps_timestamp)
|
||||
),
|
||||
|
||||
- TP_fast_assign(__assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ TP_fast_assign(__assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
memcpy(__get_dynamic_array(peer_addr), peer_addr,
|
||||
ETH_ALEN);
|
||||
__entry->peer_ps_state = peer_ps_state;
|
||||
--- a/drivers/net/wireless/ath/ath12k/trace.h 2024-09-13 13:31:32.071704265 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath12k/trace.h 2024-09-13 13:38:04.682139931 +0200
|
||||
@@ -36,8 +36,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->buf_len = buf_len;
|
||||
__entry->pktlog_checksum = pktlog_checksum;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
@@ -73,8 +73,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
__entry->info = ar->pdev->timestamp.info;
|
||||
__entry->sync_tstmp_lo_us = ar->pdev->timestamp.sync_timestamp_hi_us;
|
||||
@@ -117,8 +117,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
__entry->type = type;
|
||||
__entry->info = ar->pdev->timestamp.info;
|
||||
@@ -153,8 +153,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
--- a/drivers/net/wireless/ath/ath6kl/trace.h 2024-09-13 13:31:32.079704151 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath6kl/trace.h 2024-09-13 13:33:01.462437360 +0200
|
||||
@@ -304,8 +304,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(msg, msg);
|
||||
- __assign_str(prefix, prefix);
|
||||
+ __assign_str(msg);
|
||||
+ __assign_str(prefix);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
--- a/drivers/net/wireless/ath/trace.h 2024-09-13 13:31:32.043704662 +0200
|
||||
+++ b/drivers/net/wireless/ath/trace.h 2024-09-13 13:44:05.849032491 +0200
|
||||
@@ -44,8 +44,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, wiphy_name(wiphy));
|
||||
- __assign_str(driver, KBUILD_MODNAME);
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h 2024-09-13 13:31:31.999705285 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h 2024-09-13 13:42:28.746405624 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(func, func);
|
||||
+ __assign_str(func);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
@@ -57,7 +57,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->level = level;
|
||||
- __assign_str(func, func);
|
||||
+ __assign_str(func);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac.h 2024-09-13 13:31:32.011705114 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac.h 2024-09-13 13:42:44.218186836 +0200
|
||||
@@ -81,7 +81,7 @@
|
||||
__field(u32, mask)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
__entry->in_isr = in_isr;
|
||||
__entry->macintstatus = macintstatus;
|
||||
__entry->mask = mask;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h 2024-09-13 13:31:32.011705114 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h 2024-09-13 13:42:52.242073370 +0200
|
||||
@@ -71,7 +71,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->level = level;
|
||||
- __assign_str(func, func);
|
||||
+ __assign_str(func);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_tx.h 2024-09-13 13:31:32.011705114 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_tx.h 2024-09-13 13:43:12.721783766 +0200
|
||||
@@ -31,7 +31,7 @@
|
||||
__dynamic_array(u8, txh, txh_len)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
memcpy(__get_dynamic_array(txh), txh, txh_len);
|
||||
),
|
||||
TP_printk("[%s] txdesc", __get_str(dev))
|
||||
@@ -54,7 +54,7 @@
|
||||
__field(u16, ackphyrxsh)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
__entry->framelen = framelen;
|
||||
__entry->frameid = frameid;
|
||||
__entry->status = status;
|
||||
@@ -85,7 +85,7 @@
|
||||
__field(u16, dma_len)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
__entry->max_ampdu_len = max_ampdu_len;
|
||||
__entry->max_ampdu_frames = max_ampdu_frames;
|
||||
__entry->ampdu_len = ampdu_len;
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h 2024-09-13 13:31:31.915706475 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h 2024-09-13 13:41:47.314991509 +0200
|
||||
@@ -87,7 +87,7 @@
|
||||
#endif
|
||||
|
||||
#define DEV_ENTRY __string(dev, dev_name(dev))
|
||||
-#define DEV_ASSIGN __assign_str(dev, dev_name(dev))
|
||||
+#define DEV_ASSIGN __assign_str(dev)
|
||||
|
||||
#include "iwl-devtrace-io.h"
|
||||
#include "iwl-devtrace-ucode.h"
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h 2024-09-13 13:31:31.915706475 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h 2024-09-13 13:41:36.363146379 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->level = level;
|
||||
- __assign_str(function, function);
|
||||
+ __assign_str(function);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s", __get_str(msg))
|
||||
--- a/include/trace/events/qrtr.h 2024-09-13 13:31:32.207702337 +0200
|
||||
+++ b/include/trace/events/qrtr.h 2024-09-13 13:39:51.068635354 +0200
|
||||
@@ -102,7 +102,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(ctrl_pkt_str, ctrl_pkt_str);
|
||||
+ __assign_str(ctrl_pkt_str);
|
||||
__entry->sq_node = sq_node;
|
||||
__entry->sq_port = sq_port;
|
||||
),
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c 2024-09-13 10:39:13.578207092 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c 2024-09-13 10:44:17.201897544 +0200
|
||||
@@ -638,28 +638,22 @@
|
||||
}
|
||||
|
||||
static int iwl_mvm_tzone_set_trip_temp(struct thermal_zone_device *device,
|
||||
- int trip, int temp)
|
||||
+ const struct thermal_trip *trip, int temp)
|
||||
{
|
||||
struct iwl_mvm *mvm = thermal_zone_device_priv(device);
|
||||
- int ret;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
if (!iwl_mvm_firmware_running(mvm) ||
|
||||
mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR) {
|
||||
- ret = -EIO;
|
||||
- goto out;
|
||||
+ return -EIO;
|
||||
}
|
||||
|
||||
if ((temp / 1000) > S16_MAX) {
|
||||
- ret = -EINVAL;
|
||||
- goto out;
|
||||
+ return -EINVAL;
|
||||
}
|
||||
|
||||
- ret = iwl_mvm_send_temp_report_ths_cmd(mvm);
|
||||
-out:
|
||||
- mutex_unlock(&mvm->mutex);
|
||||
- return ret;
|
||||
+ return iwl_mvm_send_temp_report_ths_cmd(mvm);
|
||||
}
|
||||
|
||||
static struct thermal_zone_device_ops tzone_ops = {
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- a/drivers/net/wireless/realtek/rtw88/pci.c 2024-09-13 11:32:08.445153484 +0200
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/pci.c 2024-09-13 11:32:41.416685911 +0200
|
||||
@@ -1612,7 +1612,7 @@
|
||||
|
||||
static int rtw_pci_request_irq(struct rtw_dev *rtwdev, struct pci_dev *pdev)
|
||||
{
|
||||
- unsigned int flags = PCI_IRQ_LEGACY;
|
||||
+ unsigned int flags = PCI_IRQ_INTX;
|
||||
int ret;
|
||||
|
||||
if (!rtw_disable_msi)
|
||||
--- a/drivers/net/wireless/realtek/rtw89/pci.c 2024-09-13 11:43:44.919279936 +0200
|
||||
+++ b/drivers/net/wireless/realtek/rtw89/pci.c 2024-09-13 11:44:14.646858619 +0200
|
||||
@@ -3565,7 +3565,7 @@
|
||||
unsigned long flags = 0;
|
||||
int ret;
|
||||
|
||||
- flags |= PCI_IRQ_LEGACY | PCI_IRQ_MSI;
|
||||
+ flags |= PCI_IRQ_INTX | PCI_IRQ_MSI;
|
||||
ret = pci_alloc_irq_vectors(pdev, 1, 1, flags);
|
||||
if (ret < 0) {
|
||||
rtw89_err(rtwdev, "failed to alloc irq vectors, ret %d\n", ret);
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c 2024-09-13 11:55:26.397341150 +0200
|
||||
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c 2024-09-13 11:57:14.467815378 +0200
|
||||
@@ -6612,17 +6612,13 @@
|
||||
|
||||
static int init_vqs(struct virtio_device *vdev)
|
||||
{
|
||||
- vq_callback_t *callbacks[HWSIM_NUM_VQS] = {
|
||||
- [HWSIM_VQ_TX] = hwsim_virtio_tx_done,
|
||||
- [HWSIM_VQ_RX] = hwsim_virtio_rx_done,
|
||||
- };
|
||||
- const char *names[HWSIM_NUM_VQS] = {
|
||||
- [HWSIM_VQ_TX] = "tx",
|
||||
- [HWSIM_VQ_RX] = "rx",
|
||||
+ struct virtqueue_info vqs_info[HWSIM_NUM_VQS] = {
|
||||
+ [HWSIM_VQ_TX] = { "tx", hwsim_virtio_tx_done },
|
||||
+ [HWSIM_VQ_RX] = { "rx", hwsim_virtio_rx_done },
|
||||
};
|
||||
|
||||
return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
|
||||
- hwsim_vqs, callbacks, names, NULL);
|
||||
+ hwsim_vqs, vqs_info, NULL);
|
||||
}
|
||||
|
||||
static int fill_vq(struct virtqueue *vq)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h 2024-07-03 20:09:49.622279338 +0200
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h 2024-07-03 20:10:26.157677785 +0200
|
||||
@@ -294,4 +294,5 @@
|
||||
unsigned short *rxwi_size);
|
||||
void rt2800_pre_reset_hw(struct rt2x00_dev *rt2x00dev);
|
||||
|
||||
+void rt6352_enable_pa_pin(struct rt2x00_dev *rt2x00dev, int enable);
|
||||
#endif /* RT2800LIB_H */
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
--- a/debugfs.c 2024-09-06 11:08:19.656939190 +0200
|
||||
+++ b/debugfs.c 2024-09-06 11:09:04.772324072 +0200
|
||||
@@ -331,15 +331,19 @@
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct mwl_priv *priv = (struct mwl_priv *)file->private_data;
|
||||
+#if defined AARCH64
|
||||
struct pcie_priv *pcie_priv = priv->hif.priv;
|
||||
unsigned long flags;
|
||||
+#endif
|
||||
unsigned long page = get_zeroed_page(GFP_KERNEL);
|
||||
int tx_num = 4, rx_num = 4;
|
||||
char *p = (char *)page;
|
||||
int len = 0, size = PAGE_SIZE;
|
||||
ssize_t ret;
|
||||
const struct hostcmd_get_hw_spec *get_hw_spec;
|
||||
+#if defined AARCH64
|
||||
int i;
|
||||
+#endif
|
||||
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
@@ -359,6 +359,7 @@
|
||||
len += scnprintf(p + len, size - len,
|
||||
"num_wcb: %d\n", le32_to_cpu(get_hw_spec->num_wcb));
|
||||
|
||||
+#if defined AARCH64
|
||||
if (priv->chip_type == MWL8864) {
|
||||
len += scnprintf(p + len, size - len,
|
||||
"-----------------------=> address| address|qlen|fw_desc_cnt\n");
|
||||
@@ -370,6 +371,7 @@
|
||||
"wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
|
||||
spin_unlock_irqrestore(&pcie_priv->tx_desc_lock, flags);
|
||||
}
|
||||
+#endif
|
||||
|
||||
len += scnprintf(p + len, size - len,
|
||||
"num_mcast_addr: %X\n", le16_to_cpu(get_hw_spec->num_mcast_addr));
|
||||
34
6.11/package/kernel/nat46/Makefile
Normal file
34
6.11/package/kernel/nat46/Makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=nat46
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
|
||||
PKG_SOURCE_DATE:=2024-07-02
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f367088db99c9235e16dea8164eb82cbd0d299ba
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/nat46
|
||||
DEPENDS:=@IPV6 +kmod-nf-conntrack6
|
||||
TITLE:=Stateless NAT46 translation kernel module
|
||||
SECTION:=kernel
|
||||
SUBMENU:=Network Support
|
||||
FILES:=$(PKG_BUILD_DIR)/nat46/modules/nat46.ko
|
||||
AUTOLOAD:=$(call AutoLoad,33,nat46)
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/nat46/modules" \
|
||||
MODFLAGS="-DMODULE -mlong-calls" \
|
||||
EXTRA_CFLAGS="-DNAT46_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\"" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nat46))
|
||||
99
6.11/package/kernel/nat46/patches/001-fix-kernel-6.10.patch
Normal file
99
6.11/package/kernel/nat46/patches/001-fix-kernel-6.10.patch
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
--- a/nat46/modules/nat46-netdev.c 2024-08-14 16:36:59.249437588 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.c 2024-08-14 16:39:28.523016026 +0200
|
||||
@@ -193,7 +193,6 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if((0 == strcmp(dev->name, name)) && is_nat46(dev)) {
|
||||
@@ -205,7 +204,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -300,7 +298,6 @@
|
||||
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m) {
|
||||
struct net_device *dev;
|
||||
- read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if(is_nat46(dev)) {
|
||||
@@ -323,7 +320,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
|
||||
}
|
||||
|
||||
@@ -331,7 +327,6 @@
|
||||
struct net_device *dev;
|
||||
struct net_device *nat46dev;
|
||||
do {
|
||||
- read_lock(&dev_base_lock);
|
||||
nat46dev = NULL;
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
@@ -340,7 +335,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
if(nat46dev) {
|
||||
nat46_netdev_destroy(nat46dev);
|
||||
}
|
||||
--- a/nat46/modules/nat46-netdev.h 2024-08-14 16:39:50.726655831 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.h 2024-08-14 16:40:25.954084361 +0200
|
||||
@@ -25,4 +25,5 @@
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m);
|
||||
void nat46_netdev_count_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
void *netdev_nat46_instance(struct net_device *dev);
|
||||
-
|
||||
+int nat46_netdev_create(struct net *net, char *basename, struct net_device **dev);
|
||||
+void nat46_netdev_destroy(struct net_device *dev);
|
||||
--- a/nat46/modules/nat46-core.h 2024-08-14 16:44:24.686211571 +0200
|
||||
+++ b/nat46/modules/nat46-core.h 2024-08-14 16:50:42.464086457 +0200
|
||||
@@ -82,4 +82,37 @@
|
||||
nat46_instance_t *alloc_nat46_instance(int npairs, nat46_instance_t *old, int from_ipair, int to_ipair, int remove_ipair);
|
||||
void release_nat46_instance(nat46_instance_t *nat46);
|
||||
|
||||
+void nat46debug_dump(nat46_instance_t *nat46, int level, void *addr, int len);
|
||||
+int try_parse_ipv6_prefix(struct in6_addr *pref, int *pref_len, char *arg);
|
||||
+int try_parse_ipv4_prefix(u32 *v4addr, int *pref_len, char *arg);
|
||||
+int try_parse_rule_arg(nat46_xlate_rule_t *rule, char *arg_name, char **ptail);
|
||||
+char *xlate_style_to_string(nat46_xlate_style_t style);
|
||||
+void xlate_v4_to_nat64(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6);
|
||||
+int xlate_nat64_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4);
|
||||
+int xlate_map_v4_to_v6(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6, uint16_t *pl4id, int map_version);
|
||||
+int xlate_map_v6_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4, int version);
|
||||
+int xlate_v4_to_v6(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6, uint16_t *pl4id);
|
||||
+int xlate_v6_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4);
|
||||
+__sum16 csum16_upd(__sum16 csum, u16 old, u16 new);
|
||||
+__sum16 csum_tcpudp_remagic(__be32 saddr, __be32 daddr, u32 len, unsigned char proto, u16 csum);
|
||||
+__sum16 csum_ipv6_unmagic(nat46_instance_t *nat46, const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __sum16 csum);
|
||||
+void update_icmp6_type_code(nat46_instance_t *nat46, struct icmp6hdr *icmp6h, u8 type, u8 code);
|
||||
+u16 get_next_ip_id(void);
|
||||
+u16 fold_ipv6_frag_id(u32 v6id);
|
||||
+void *add_offset(void *ptr, u16 offset);
|
||||
+void *get_next_header_ptr6(void *pv6, int v6_len);
|
||||
+void fill_v4hdr_from_v6hdr(struct iphdr * iph, struct ipv6hdr *ip6h, __u32 v4saddr, __u32 v4daddr, __u16 id, __u16 frag_off, __u16 proto, int l3_payload_len);
|
||||
+u16 unchecksum16(void *p, int count, u16 csum);
|
||||
+u16 rechecksum16(void *p, int count, u16 csum);
|
||||
+int is_last_pair_in_group(nat46_xlate_rulepair_t *apair);
|
||||
+void pairs_xlate_v6_to_v4_inner(nat46_instance_t *nat46, struct ipv6hdr *ip6h, __u32 *pv4saddr, __u32 *pv4daddr);
|
||||
+int xlate_payload6_to4(nat46_instance_t *nat46, void *pv6, void *ptrans_hdr, int v6_len, u16 *ul_sum, int *ptailTruncSize);
|
||||
+u8 *icmp_parameter_ptr(struct icmphdr *icmph);
|
||||
+u32 *icmp6_parameter_ptr(struct icmp6hdr *icmp6h);
|
||||
+int ip6_input_not_interested(nat46_instance_t *nat46, struct ipv6hdr *ip6h, struct sk_buff *old_skb);
|
||||
+int pairs_xlate_v6_to_v4_outer(nat46_instance_t *nat46, struct ipv6hdr *ip6h, uint16_t proto, __u32 *pv4saddr, __u32 *pv4daddr);
|
||||
+void ip6_update_csum(struct sk_buff * skb, struct ipv6hdr * ip6hdr, int do_atomic_frag);
|
||||
+int ip4_input_not_interested(nat46_instance_t *nat46, struct iphdr *iph, struct sk_buff *old_skb);
|
||||
+int pairs_xlate_v4_to_v6_outer(nat46_instance_t *nat46, struct iphdr *hdr4, uint16_t *sport, uint16_t *dport, void *v6saddr, void *v6daddr);
|
||||
+int is_valid_nat46(nat46_instance_t *nat46);
|
||||
#endif
|
||||
10
6.11/package/kernel/nat46/patches/002-fix-kernel-6.11.patch
Normal file
10
6.11/package/kernel/nat46/patches/002-fix-kernel-6.11.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- a/nat46/modules/nat46-netdev.c 2024-09-13 09:39:48.960815094 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.c 2024-09-13 09:40:11.128500472 +0200
|
||||
@@ -110,7 +110,6 @@
|
||||
dev->hard_header_len = 0;
|
||||
dev->addr_len = 0;
|
||||
dev->mtu = 16384; /* iptables does reassembly. Rather than using ETH_DATA_LEN, let's try to get as much mileage as we can with the Linux stack */
|
||||
- dev->features = NETIF_F_NETNS_LOCAL;
|
||||
dev->flags = IFF_NOARP | IFF_POINTOPOINT;
|
||||
}
|
||||
|
||||
76
6.11/package/libs/libnftnl/Makefile
Normal file
76
6.11/package/libs/libnftnl/Makefile
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# Copyright (C) 2014 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:=libnftnl
|
||||
PKG_CPE_ID:=cpe:/a:netfilter:libnftnl
|
||||
PKG_VERSION:=1.2.6
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4
|
||||
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DISABLE_NLS:=
|
||||
|
||||
define Package/libnftnl
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libmnl
|
||||
TITLE:=Low-level netlink library for the nf_tables subsystem
|
||||
URL:=http://www.netfilter.org/projects/libnftnl
|
||||
ABI_VERSION:=11
|
||||
endef
|
||||
|
||||
define Package/libnftnl/description
|
||||
libnftnl is a userspace library providing a low-level netlink
|
||||
programming interface (API) to the in-kernel nf_tables subsystem.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libnftnl
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/libnftnl/*.h \
|
||||
$(1)/usr/include/libnftnl/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libnftnl.{so*,a,la} \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftnl.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libnftnl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libnftnl.so.* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libnftnl))
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
From 6c39f04febd7cfdbd474233379416babcd0fc341 Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Fri, 8 Apr 2022 23:52:11 +0800
|
||||
Subject: [PATCH] libnftnl: add fullcone expression support
|
||||
|
||||
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
|
||||
---
|
||||
include/libnftnl/expr.h | 6 +
|
||||
include/linux/netfilter/nf_tables.h | 16 +++
|
||||
src/Makefile.am | 1 +
|
||||
src/expr/fullcone.c | 167 ++++++++++++++++++++++++++++
|
||||
src/expr_ops.c | 2 +
|
||||
5 files changed, 192 insertions(+)
|
||||
create mode 100644 src/expr/fullcone.c
|
||||
|
||||
--- a/include/libnftnl/expr.h
|
||||
+++ b/include/libnftnl/expr.h
|
||||
@@ -245,6 +245,12 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
+ NFTNL_EXPR_FULLCONE_FLAGS = NFTNL_EXPR_BASE,
|
||||
+ NFTNL_EXPR_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTNL_EXPR_FULLCONE_REG_PROTO_MAX,
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
NFTNL_EXPR_REDIR_REG_PROTO_MIN = NFTNL_EXPR_BASE,
|
||||
NFTNL_EXPR_REDIR_REG_PROTO_MAX,
|
||||
NFTNL_EXPR_REDIR_FLAGS,
|
||||
--- a/include/linux/netfilter/nf_tables.h
|
||||
+++ b/include/linux/netfilter/nf_tables.h
|
||||
@@ -1434,6 +1434,22 @@ enum nft_masq_attributes {
|
||||
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
|
||||
|
||||
/**
|
||||
+ * enum nft_fullcone_attributes - nf_tables fullcone expression attributes
|
||||
+ *
|
||||
+ * @NFTA_FULLCONE_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
|
||||
+ */
|
||||
+enum nft_fullcone_attributes {
|
||||
+ NFTA_FULLCONE_UNSPEC,
|
||||
+ NFTA_FULLCONE_FLAGS,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ __NFTA_FULLCONE_MAX
|
||||
+};
|
||||
+#define NFTA_FULLCONE_MAX (__NFTA_FULLCONE_MAX - 1)
|
||||
+
|
||||
+/**
|
||||
* enum nft_redir_attributes - nf_tables redirect expression netlink attributes
|
||||
*
|
||||
* @NFTA_REDIR_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -54,6 +54,7 @@ libnftnl_la_SOURCES = utils.c \
|
||||
expr/target.c \
|
||||
expr/tunnel.c \
|
||||
expr/masq.c \
|
||||
+ expr/fullcone.c \
|
||||
expr/redir.c \
|
||||
expr/hash.c \
|
||||
expr/socket.c \
|
||||
--- /dev/null
|
||||
+++ b/src/expr/fullcone.c
|
||||
@@ -0,0 +1,168 @@
|
||||
+/*
|
||||
+ * (C) 2022 wongsyrone
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published
|
||||
+ * by the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdint.h>
|
||||
+#include <arpa/inet.h>
|
||||
+#include <errno.h>
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
+#include <linux/netfilter/nf_tables.h>
|
||||
+
|
||||
+#include "internal.h"
|
||||
+#include <libmnl/libmnl.h>
|
||||
+#include <libnftnl/expr.h>
|
||||
+#include <libnftnl/rule.h>
|
||||
+
|
||||
+struct nftnl_expr_fullcone {
|
||||
+ uint32_t flags;
|
||||
+ enum nft_registers sreg_proto_min;
|
||||
+ enum nft_registers sreg_proto_max;
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+nftnl_expr_fullcone_set(struct nftnl_expr *e, uint16_t type,
|
||||
+ const void *data, uint32_t data_len)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTNL_EXPR_FULLCONE_FLAGS:
|
||||
+ memcpy(&fullcone->flags, data, sizeof(fullcone->flags));
|
||||
+ break;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
|
||||
+ memcpy(&fullcone->sreg_proto_min, data, sizeof(fullcone->sreg_proto_min));
|
||||
+ break;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
|
||||
+ memcpy(&fullcone->sreg_proto_max, data, sizeof(fullcone->sreg_proto_max));
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const void *
|
||||
+nftnl_expr_fullcone_get(const struct nftnl_expr *e, uint16_t type,
|
||||
+ uint32_t *data_len)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTNL_EXPR_FULLCONE_FLAGS:
|
||||
+ *data_len = sizeof(fullcone->flags);
|
||||
+ return &fullcone->flags;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
|
||||
+ *data_len = sizeof(fullcone->sreg_proto_min);
|
||||
+ return &fullcone->sreg_proto_min;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
|
||||
+ *data_len = sizeof(fullcone->sreg_proto_max);
|
||||
+ return &fullcone->sreg_proto_max;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static int nftnl_expr_fullcone_cb(const struct nlattr *attr, void *data)
|
||||
+{
|
||||
+ const struct nlattr **tb = data;
|
||||
+ int type = mnl_attr_get_type(attr);
|
||||
+
|
||||
+ if (mnl_attr_type_valid(attr, NFTA_FULLCONE_MAX) < 0)
|
||||
+ return MNL_CB_OK;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTA_FULLCONE_REG_PROTO_MIN:
|
||||
+ case NFTA_FULLCONE_REG_PROTO_MAX:
|
||||
+ case NFTA_FULLCONE_FLAGS:
|
||||
+ if (mnl_attr_validate(attr, MNL_TYPE_U32) < 0)
|
||||
+ abi_breakage();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ tb[type] = attr;
|
||||
+ return MNL_CB_OK;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+nftnl_expr_fullcone_build(struct nlmsghdr *nlh, const struct nftnl_expr *e)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_FLAGS))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_FLAGS, htobe32(fullcone->flags));
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ htobe32(fullcone->sreg_proto_min));
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ htobe32(fullcone->sreg_proto_max));
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+nftnl_expr_fullcone_parse(struct nftnl_expr *e, struct nlattr *attr)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+ struct nlattr *tb[NFTA_FULLCONE_MAX+1] = {};
|
||||
+
|
||||
+ if (mnl_attr_parse_nested(attr, nftnl_expr_fullcone_cb, tb) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (tb[NFTA_FULLCONE_FLAGS]) {
|
||||
+ fullcone->flags = be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_FLAGS]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_FLAGS);
|
||||
+ }
|
||||
+ if (tb[NFTA_FULLCONE_REG_PROTO_MIN]) {
|
||||
+ fullcone->sreg_proto_min =
|
||||
+ be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_REG_PROTO_MIN]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN);
|
||||
+ }
|
||||
+ if (tb[NFTA_FULLCONE_REG_PROTO_MAX]) {
|
||||
+ fullcone->sreg_proto_max =
|
||||
+ be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_REG_PROTO_MAX]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int nftnl_expr_fullcone_snprintf(char *buf, size_t remain,
|
||||
+ uint32_t flags, const struct nftnl_expr *e)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+ int offset = 0, ret = 0;
|
||||
+
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN)) {
|
||||
+ ret = snprintf(buf + offset, remain, "proto_min reg %u ",
|
||||
+ fullcone->sreg_proto_min);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX)) {
|
||||
+ ret = snprintf(buf + offset, remain, "proto_max reg %u ",
|
||||
+ fullcone->sreg_proto_max);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_FLAGS)) {
|
||||
+ ret = snprintf(buf + offset, remain, "flags 0x%x ", fullcone->flags);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+
|
||||
+ return offset;
|
||||
+}
|
||||
+
|
||||
+struct expr_ops expr_ops_fullcone = {
|
||||
+ .name = "fullcone",
|
||||
+ .alloc_len = sizeof(struct nftnl_expr_fullcone),
|
||||
+ .max_attr = NFTA_FULLCONE_MAX,
|
||||
+ .set = nftnl_expr_fullcone_set,
|
||||
+ .get = nftnl_expr_fullcone_get,
|
||||
+ .parse = nftnl_expr_fullcone_parse,
|
||||
+ .build = nftnl_expr_fullcone_build,
|
||||
+ .output = nftnl_expr_fullcone_snprintf,
|
||||
+};
|
||||
+
|
||||
--- a/src/expr_ops.c
|
||||
+++ b/src/expr_ops.c
|
||||
@@ -19,6 +19,7 @@ extern struct expr_ops expr_ops_limit;
|
||||
extern struct expr_ops expr_ops_log;
|
||||
extern struct expr_ops expr_ops_lookup;
|
||||
extern struct expr_ops expr_ops_masq;
|
||||
+extern struct expr_ops expr_ops_fullcone;
|
||||
extern struct expr_ops expr_ops_match;
|
||||
extern struct expr_ops expr_ops_meta;
|
||||
extern struct expr_ops expr_ops_ng;
|
||||
@@ -63,6 +64,7 @@ static struct expr_ops *expr_ops[] = {
|
||||
&expr_ops_log,
|
||||
&expr_ops_lookup,
|
||||
&expr_ops_masq,
|
||||
+ &expr_ops_fullcone,
|
||||
&expr_ops_match,
|
||||
&expr_ops_meta,
|
||||
&expr_ops_ng,
|
||||
200
6.11/package/libs/mbedtls/Config.in
Normal file
200
6.11/package/libs/mbedtls/Config.in
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
if PACKAGE_libmbedtls
|
||||
|
||||
comment "Option details in source code: include/mbedtls/mbedtls_config.h"
|
||||
|
||||
comment "Ciphers - unselect old or less-used ciphers to reduce binary size"
|
||||
|
||||
config MBEDTLS_AES_C
|
||||
bool "MBEDTLS_AES_C"
|
||||
default y
|
||||
|
||||
config MBEDTLS_CAMELLIA_C
|
||||
bool "MBEDTLS_CAMELLIA_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CCM_C
|
||||
bool "MBEDTLS_CCM_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CMAC_C
|
||||
bool "MBEDTLS_CMAC_C (old but used by hostapd)"
|
||||
default y
|
||||
|
||||
config MBEDTLS_DES_C
|
||||
bool "MBEDTLS_DES_C (old but used by hostapd)"
|
||||
default y
|
||||
|
||||
config MBEDTLS_GCM_C
|
||||
bool "MBEDTLS_GCM_C"
|
||||
default y
|
||||
|
||||
config MBEDTLS_NIST_KW_C
|
||||
bool "MBEDTLS_NIST_KW_C (old but used by hostapd)"
|
||||
default y
|
||||
|
||||
config MBEDTLS_RIPEMD160_C
|
||||
bool "MBEDTLS_RIPEMD160_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_XTEA_C
|
||||
bool "MBEDTLS_XTEA_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_RSA_NO_CRT
|
||||
bool "MBEDTLS_RSA_NO_CRT"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED"
|
||||
default n
|
||||
|
||||
comment "Curves - unselect old or less-used curves to reduce binary size"
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP192R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP192R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP224R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP224R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP256R1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP384R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP384R1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP521R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP521R1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP192K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP192K1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP224K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP224K1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP256K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP256K1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_BP256R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_BP256R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_BP384R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_BP384R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_BP512R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_BP512R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_CURVE25519_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_CURVE448_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_CURVE448_ENABLED"
|
||||
default n
|
||||
|
||||
comment "Build Options - unselect features to reduce binary size"
|
||||
|
||||
config MBEDTLS_CERTS_C
|
||||
bool "MBEDTLS_CERTS_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CIPHER_MODE_OFB
|
||||
bool "MBEDTLS_CIPHER_MODE_OFB"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CIPHER_MODE_XTS
|
||||
bool "MBEDTLS_CIPHER_MODE_XTS"
|
||||
default n
|
||||
|
||||
config MBEDTLS_DEBUG_C
|
||||
bool "MBEDTLS_DEBUG_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_HKDF_C
|
||||
bool "MBEDTLS_HKDF_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_PLATFORM_C
|
||||
bool "MBEDTLS_PLATFORM_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_SELF_TEST
|
||||
bool "MBEDTLS_SELF_TEST"
|
||||
default n
|
||||
|
||||
config MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
bool "MBEDTLS_SSL_TRUNCATED_HMAC"
|
||||
default n
|
||||
|
||||
config MBEDTLS_THREADING_C
|
||||
bool "MBEDTLS_THREADING_C"
|
||||
default y
|
||||
|
||||
config MBEDTLS_THREADING_PTHREAD
|
||||
def_bool MBEDTLS_THREADING_C
|
||||
|
||||
config MBEDTLS_VERSION_C
|
||||
bool "MBEDTLS_VERSION_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_VERSION_FEATURES
|
||||
bool "MBEDTLS_VERSION_FEATURES"
|
||||
default n
|
||||
|
||||
comment "Build Options"
|
||||
|
||||
config MBEDTLS_ENTROPY_FORCE_SHA256
|
||||
bool "MBEDTLS_ENTROPY_FORCE_SHA256"
|
||||
default y
|
||||
|
||||
config MBEDTLS_SSL_RENEGOTIATION
|
||||
bool "MBEDTLS_SSL_RENEGOTIATION"
|
||||
default n
|
||||
|
||||
endif
|
||||
164
6.11/package/libs/mbedtls/Makefile
Normal file
164
6.11/package/libs/mbedtls/Makefile
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
#
|
||||
# Copyright (C) 2011-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:=mbedtls
|
||||
PKG_VERSION:=2.28.7
|
||||
PKG_RELEASE:=2
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1df6073f0cf6a4e1953890bf5e0de2a8c7e6be50d6d6c69fa9fefcb1d14e981a
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=gpl-2.0.txt
|
||||
PKG_CPE_ID:=cpe:/a:arm:mbed_tls
|
||||
|
||||
MBEDTLS_BUILD_OPTS_CURVES= \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_CURVE448_ENABLED
|
||||
|
||||
MBEDTLS_BUILD_OPTS_CIPHERS= \
|
||||
CONFIG_MBEDTLS_AES_C \
|
||||
CONFIG_MBEDTLS_CAMELLIA_C \
|
||||
CONFIG_MBEDTLS_CCM_C \
|
||||
CONFIG_MBEDTLS_CMAC_C \
|
||||
CONFIG_MBEDTLS_DES_C \
|
||||
CONFIG_MBEDTLS_GCM_C \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_NIST_KW_C \
|
||||
CONFIG_MBEDTLS_RIPEMD160_C \
|
||||
CONFIG_MBEDTLS_RSA_NO_CRT \
|
||||
CONFIG_MBEDTLS_XTEA_C
|
||||
|
||||
MBEDTLS_BUILD_OPTS= \
|
||||
$(MBEDTLS_BUILD_OPTS_CURVES) \
|
||||
$(MBEDTLS_BUILD_OPTS_CIPHERS) \
|
||||
CONFIG_MBEDTLS_CERTS_C \
|
||||
CONFIG_MBEDTLS_CIPHER_MODE_OFB \
|
||||
CONFIG_MBEDTLS_CIPHER_MODE_XTS \
|
||||
CONFIG_MBEDTLS_DEBUG_C \
|
||||
CONFIG_MBEDTLS_ENTROPY_FORCE_SHA256 \
|
||||
CONFIG_MBEDTLS_HKDF_C \
|
||||
CONFIG_MBEDTLS_PLATFORM_C \
|
||||
CONFIG_MBEDTLS_SELF_TEST \
|
||||
CONFIG_MBEDTLS_SSL_RENEGOTIATION \
|
||||
CONFIG_MBEDTLS_SSL_TRUNCATED_HMAC \
|
||||
CONFIG_MBEDTLS_THREADING_C \
|
||||
CONFIG_MBEDTLS_THREADING_PTHREAD \
|
||||
CONFIG_MBEDTLS_VERSION_C \
|
||||
CONFIG_MBEDTLS_VERSION_FEATURES
|
||||
|
||||
PKG_CONFIG_DEPENDS := $(MBEDTLS_BUILD_OPTS)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/mbedtls/Default
|
||||
TITLE:=Embedded SSL
|
||||
URL:=https://tls.mbed.org
|
||||
endef
|
||||
|
||||
define Package/mbedtls/Default/description
|
||||
The aim of the mbedtls project is to provide a quality, open-source
|
||||
cryptographic library written in C and targeted at embedded systems.
|
||||
endef
|
||||
|
||||
define Package/libmbedtls
|
||||
$(call Package/mbedtls/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=SSL
|
||||
TITLE+= (library)
|
||||
ABI_VERSION:=13
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libmbedtls/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/mbedtls-util
|
||||
$(call Package/mbedtls/Default)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE+= (utilities)
|
||||
DEPENDS:=+libmbedtls
|
||||
endef
|
||||
|
||||
define Package/libmbedtls/description
|
||||
$(call Package/mbedtls/Default/description)
|
||||
This package contains the mbedtls library.
|
||||
endef
|
||||
|
||||
define Package/mbedtls-util/description
|
||||
$(call Package/mbedtls/Default/description)
|
||||
This package contains mbedtls helper programs for private key and
|
||||
CSR generation (gen_key, cert_req)
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
|
||||
-DENABLE_TESTING:Bool=OFF \
|
||||
-DENABLE_PROGRAMS:Bool=ON
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
$(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))),
|
||||
$(foreach opt,$(MBEDTLS_BUILD_OPTS),
|
||||
$(PKG_BUILD_DIR)/scripts/config.py \
|
||||
-f $(PKG_BUILD_DIR)/include/mbedtls/config.h \
|
||||
$(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libmbedtls/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/mbedtls-util/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gen_key $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cert_req $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libmbedtls))
|
||||
$(eval $(call BuildPackage,mbedtls-util))
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
From eb9d4fdf1846e688d51d86a9a50f0312aca2af25 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Sun, 23 Oct 2022 19:48:18 -0400
|
||||
Subject: [PATCH] x509 crt verify SAN iPAddress
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
include/mbedtls/x509_crt.h | 2 +-
|
||||
library/x509_crt.c | 126 ++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 103 insertions(+), 25 deletions(-)
|
||||
|
||||
--- a/include/mbedtls/x509_crt.h
|
||||
+++ b/include/mbedtls/x509_crt.h
|
||||
@@ -608,7 +608,7 @@ int mbedtls_x509_crt_verify_info(char *b
|
||||
* \param cn The expected Common Name. This will be checked to be
|
||||
* present in the certificate's subjectAltNames extension or,
|
||||
* if this extension is absent, as a CN component in its
|
||||
- * Subject name. Currently only DNS names are supported. This
|
||||
+ * Subject name. DNS names and IP addresses are supported. This
|
||||
* may be \c NULL if the CN need not be verified.
|
||||
* \param flags The address at which to store the result of the verification.
|
||||
* If the verification couldn't be completed, the flag value is
|
||||
--- a/library/x509_crt.c
|
||||
+++ b/library/x509_crt.c
|
||||
@@ -57,6 +57,10 @@
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
+#define WIN32_LEAN_AND_MEAN
|
||||
+#ifndef _WIN32_WINNT
|
||||
+#define _WIN32_WINNT 0x0600
|
||||
+#endif
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
@@ -3002,6 +3006,61 @@ find_parent:
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma comment(lib, "ws2_32.lib")
|
||||
+#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
+#elif (defined(__MINGW32__) || defined(__MINGW64__)) && _WIN32_WINNT >= 0x0600
|
||||
+#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
+#endif
|
||||
+#elif defined(__sun)
|
||||
+/* Solaris requires -lsocket -lnsl for inet_pton() */
|
||||
+#elif defined(__has_include)
|
||||
+#if __has_include(<sys/socket.h>)
|
||||
+#include <sys/socket.h>
|
||||
+#endif
|
||||
+#if __has_include(<arpa/inet.h>)
|
||||
+#include <arpa/inet.h>
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+/* Use whether or not AF_INET6 is defined to indicate whether or not to use
|
||||
+ * the platform inet_pton() or a local implementation (below). The local
|
||||
+ * implementation may be used even in cases where the platform provides
|
||||
+ * inet_pton(), e.g. when there are different includes required and/or the
|
||||
+ * platform implementation requires dependencies on additional libraries.
|
||||
+ * Specifically, Windows requires custom includes and additional link
|
||||
+ * dependencies, and Solaris requires additional link dependencies.
|
||||
+ * Also, as a coarse heuristic, use the local implementation if the compiler
|
||||
+ * does not support __has_include(), or if the definition of AF_INET6 is not
|
||||
+ * provided by headers included (or not) via __has_include() above. */
|
||||
+#ifndef AF_INET6
|
||||
+
|
||||
+#define x509_cn_inet_pton(cn, dst) (0)
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+static int x509_inet_pton_ipv6(const char *src, void *dst)
|
||||
+{
|
||||
+ return inet_pton(AF_INET6, src, dst) == 1 ? 0 : -1;
|
||||
+}
|
||||
+
|
||||
+static int x509_inet_pton_ipv4(const char *src, void *dst)
|
||||
+{
|
||||
+ return inet_pton(AF_INET, src, dst) == 1 ? 0 : -1;
|
||||
+}
|
||||
+
|
||||
+#endif /* AF_INET6 */
|
||||
+
|
||||
+static size_t x509_cn_inet_pton(const char *cn, void *dst)
|
||||
+{
|
||||
+ return strchr(cn, ':') == NULL
|
||||
+ ? x509_inet_pton_ipv4(cn, dst) == 0 ? 4 : 0
|
||||
+ : x509_inet_pton_ipv6(cn, dst) == 0 ? 16 : 0;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Check for CN match
|
||||
*/
|
||||
@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt
|
||||
return -1;
|
||||
}
|
||||
|
||||
+static int x509_crt_check_san_ip(const mbedtls_x509_sequence *san,
|
||||
+ const char *cn, size_t cn_len)
|
||||
+{
|
||||
+ uint32_t ip[4];
|
||||
+ cn_len = x509_cn_inet_pton(cn, ip);
|
||||
+ if (cn_len == 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
|
||||
+ const unsigned char san_type = (unsigned char) cur->buf.tag &
|
||||
+ MBEDTLS_ASN1_TAG_VALUE_MASK;
|
||||
+ if (san_type == MBEDTLS_X509_SAN_IP_ADDRESS &&
|
||||
+ cur->buf.len == cn_len && memcmp(cur->buf.p, ip, cn_len) == 0) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Check for SAN match, see RFC 5280 Section 4.2.1.6
|
||||
*/
|
||||
-static int x509_crt_check_san(const mbedtls_x509_buf *name,
|
||||
+static int x509_crt_check_san(const mbedtls_x509_sequence *san,
|
||||
const char *cn, size_t cn_len)
|
||||
{
|
||||
- const unsigned char san_type = (unsigned char) name->tag &
|
||||
- MBEDTLS_ASN1_TAG_VALUE_MASK;
|
||||
-
|
||||
- /* dNSName */
|
||||
- if (san_type == MBEDTLS_X509_SAN_DNS_NAME) {
|
||||
- return x509_crt_check_cn(name, cn, cn_len);
|
||||
+ int san_ip = 0;
|
||||
+ for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
|
||||
+ switch ((unsigned char) cur->buf.tag & MBEDTLS_ASN1_TAG_VALUE_MASK) {
|
||||
+ case MBEDTLS_X509_SAN_DNS_NAME: /* dNSName */
|
||||
+ if (x509_crt_check_cn(&cur->buf, cn, cn_len) == 0) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ break;
|
||||
+ case MBEDTLS_X509_SAN_IP_ADDRESS: /* iPAddress */
|
||||
+ san_ip = 1;
|
||||
+ break;
|
||||
+ /* (We may handle other types here later.) */
|
||||
+ default: /* Unrecognized type */
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
- /* (We may handle other types here later.) */
|
||||
-
|
||||
- /* Unrecognized type */
|
||||
- return -1;
|
||||
+ return san_ip ? x509_crt_check_san_ip(san, cn, cn_len) : -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m
|
||||
uint32_t *flags)
|
||||
{
|
||||
const mbedtls_x509_name *name;
|
||||
- const mbedtls_x509_sequence *cur;
|
||||
size_t cn_len = strlen(cn);
|
||||
|
||||
if (crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME) {
|
||||
- for (cur = &crt->subject_alt_names; cur != NULL; cur = cur->next) {
|
||||
- if (x509_crt_check_san(&cur->buf, cn, cn_len) == 0) {
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (cur == NULL) {
|
||||
- *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
|
||||
+ if (x509_crt_check_san(&crt->subject_alt_names, cn, cn_len) == 0) {
|
||||
+ return;
|
||||
}
|
||||
} else {
|
||||
for (name = &crt->subject; name != NULL; name = name->next) {
|
||||
if (MBEDTLS_OID_CMP(MBEDTLS_OID_AT_CN, &name->oid) == 0 &&
|
||||
x509_crt_check_cn(&name->val, cn, cn_len) == 0) {
|
||||
- break;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
- if (name == NULL) {
|
||||
- *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
|
||||
- }
|
||||
}
|
||||
+
|
||||
+ *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
|
||||
}
|
||||
|
||||
/*
|
||||
15
6.11/package/libs/mbedtls/patches/101-remove-test.patch
Normal file
15
6.11/package/libs/mbedtls/patches/101-remove-test.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- a/programs/CMakeLists.txt
|
||||
+++ b/programs/CMakeLists.txt
|
||||
@@ -1,12 +1,8 @@
|
||||
add_subdirectory(aes)
|
||||
-if (NOT WIN32)
|
||||
- add_subdirectory(fuzz)
|
||||
-endif()
|
||||
add_subdirectory(hash)
|
||||
add_subdirectory(pkey)
|
||||
add_subdirectory(psa)
|
||||
add_subdirectory(random)
|
||||
add_subdirectory(ssl)
|
||||
-add_subdirectory(test)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(x509)
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- a/root/usr/share/firewall4/templates/ruleset.uc 2023-07-28 18:55:05.492297782 +0200
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc 2023-07-28 18:58:52.300598623 +0200
|
||||
@@ -218,9 +218,7 @@
|
||||
{% for (let rule in fw4.rules(`input_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.dflags.dnat): %}
|
||||
ct status dnat accept comment "!fw4: Accept port redirections"
|
||||
-{% endif %}
|
||||
{% fw4.includes('chain-append', `input_${zone.name}`) %}
|
||||
jump {{ zone.input }}_from_{{ zone.name }}
|
||||
}
|
||||
@@ -239,9 +237,7 @@
|
||||
{% for (let rule in fw4.rules(`forward_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.dflags.dnat): %}
|
||||
ct status dnat accept comment "!fw4: Accept port forwards"
|
||||
-{% endif %}
|
||||
{% fw4.includes('chain-append', `forward_${zone.name}`) %}
|
||||
jump {{ zone.forward }}_to_{{ zone.name }}
|
||||
{% if (fw4.forward_policy() != "accept" && (zone.log & 1)): %}
|
||||
|
|
@ -0,0 +1,248 @@
|
|||
From d4081c498ddca184578903fe5199d390bbc0707b Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 13:24:19 +0800
|
||||
Subject: [PATCH] firewall4: add fullcone support
|
||||
|
||||
fullcone is drop-in replacement of masq for non-udp traffic
|
||||
|
||||
add runtime fullcone rule check, disable it globally if fullcone expr is
|
||||
invalid
|
||||
|
||||
defaults.fullcone is the global switch, while zone.fullcone4 and
|
||||
zone.fullcone6 are switches for IPv4 and IPv6 respectively, most
|
||||
IPv6 traffic do NOT need this FullCone NAT functionality.
|
||||
---
|
||||
root/etc/config/firewall | 3 +
|
||||
root/usr/share/firewall4/templates/ruleset.uc | 16 +++-
|
||||
.../firewall4/templates/zone-fullcone.uc | 4 +
|
||||
root/usr/share/ucode/fw4.uc | 76 ++++++++++++++++++-
|
||||
4 files changed, 96 insertions(+), 3 deletions(-)
|
||||
create mode 100644 root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
|
||||
diff --git a/root/etc/config/firewall b/root/etc/config/firewall
|
||||
index b9a4647..7187723 100644
|
||||
--- a/root/etc/config/firewall
|
||||
+++ b/root/etc/config/firewall
|
||||
@@ -5,6 +5,7 @@ config defaults
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
+ option fullcone '0'
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
@@ -20,6 +21,8 @@ config zone
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
+ option fullcone4 '0'
|
||||
+ option fullcone6 '0'
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
diff --git a/root/usr/share/firewall4/templates/ruleset.uc b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
index eaa1f04..e29eae6 100644
|
||||
--- a/root/usr/share/firewall4/templates/ruleset.uc
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -310,6 +310,12 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`dstnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
+{% if (zone.fullcone4): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 4, direction: "dstnat" }) %}
|
||||
+{% endif %}
|
||||
+{% if (zone.fullcone6): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 6, direction: "dstnat" }) %}
|
||||
+{% endif %}
|
||||
{% fw4.includes('chain-append', `dstnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
@@ -320,20 +326,26 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`srcnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.masq): %}
|
||||
+{% if (zone.masq && !zone.fullcone4): %}
|
||||
{% for (let saddrs in zone.masq4_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq4_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 4, saddrs, daddrs }) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
-{% if (zone.masq6): %}
|
||||
+{% if (zone.masq6 && !zone.fullcone6): %}
|
||||
{% for (let saddrs in zone.masq6_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq6_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 6, saddrs, daddrs }) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
+{% if (zone.fullcone4): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 4, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
+{% if (zone.fullcone6): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 6, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
{% fw4.includes('chain-append', `srcnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
diff --git a/root/usr/share/firewall4/templates/zone-fullcone.uc b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
new file mode 100644
|
||||
index 0000000..77d9806
|
||||
--- /dev/null
|
||||
+++ b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
@@ -0,0 +1,4 @@
|
||||
+{# /usr/share/firewall4/templates/zone-fullcone.uc #}
|
||||
+ meta nfproto {{ fw4.nfproto(family) }} fullcone comment "!fw4: Handle {{
|
||||
+ zone.name
|
||||
+}} {{ fw4.nfproto(family, true) }} fullcone NAT {{ direction }} traffic"
|
||||
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
|
||||
index 1b4764c..c5716da 100644
|
||||
--- a/root/usr/share/ucode/fw4.uc
|
||||
+++ b/root/usr/share/ucode/fw4.uc
|
||||
@@ -1,3 +1,5 @@
|
||||
+// /usr/share/ucode/fw4.uc
|
||||
+
|
||||
const fs = require("fs");
|
||||
const uci = require("uci");
|
||||
const ubus = require("ubus");
|
||||
@@ -428,6 +430,25 @@ function nft_try_hw_offload(devices) {
|
||||
return (rc == 0);
|
||||
}
|
||||
|
||||
+function nft_try_fullcone() {
|
||||
+ let nft_test =
|
||||
+ 'add table inet fw4-fullcone-test; ' +
|
||||
+ 'add chain inet fw4-fullcone-test dstnat { ' +
|
||||
+ 'type nat hook prerouting priority -100; policy accept; ' +
|
||||
+ 'fullcone; ' +
|
||||
+ '}; ' +
|
||||
+ 'add chain inet fw4-fullcone-test srcnat { ' +
|
||||
+ 'type nat hook postrouting priority -100; policy accept; ' +
|
||||
+ 'fullcone; ' +
|
||||
+ '}; ';
|
||||
+ let cmd = sprintf("/usr/sbin/nft -c '%s' 2>/dev/null", replace(nft_test, "'", "'\\''"));
|
||||
+ let ok = system(cmd) == 0;
|
||||
+ //if (!ok) {
|
||||
+ // warn("nft_try_fullcone: cmd "+ cmd + "\n");
|
||||
+ //}
|
||||
+ return ok;
|
||||
+}
|
||||
+
|
||||
|
||||
return {
|
||||
read_kernel_version: function() {
|
||||
@@ -765,6 +786,18 @@ return {
|
||||
warn(`[!] ${msg}\n`);
|
||||
},
|
||||
|
||||
+ myinfo: function(fmt, ...args) {
|
||||
+ if (getenv("QUIET"))
|
||||
+ return;
|
||||
+
|
||||
+ let msg = sprintf(fmt, ...args);
|
||||
+
|
||||
+ if (getenv("TTY"))
|
||||
+ warn(`\033[32m${msg}\033[m\n`);
|
||||
+ else
|
||||
+ warn(`[I] ${msg}\n`);
|
||||
+ },
|
||||
+
|
||||
get: function(sid, opt) {
|
||||
return this.cursor.get("firewall", sid, opt);
|
||||
},
|
||||
@@ -946,6 +979,21 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
+ myinfo_section: function(s, msg) {
|
||||
+ if (s[".name"]) {
|
||||
+ if (s.name)
|
||||
+ this.myinfo("Section %s (%s) %s", this.section_id(s[".name"]), s.name, msg);
|
||||
+ else
|
||||
+ this.myinfo("Section %s %s", this.section_id(s[".name"]), msg);
|
||||
+ }
|
||||
+ else {
|
||||
+ if (s.name)
|
||||
+ this.myinfo("ubus %s (%s) %s", s.type || "rule", s.name, msg);
|
||||
+ else
|
||||
+ this.myinfo("ubus %s %s", s.type || "rule", msg);
|
||||
+ }
|
||||
+ },
|
||||
+
|
||||
parse_policy: function(val) {
|
||||
return this.parse_enum(val, [
|
||||
"accept",
|
||||
@@ -1385,6 +1433,7 @@ return {
|
||||
"dnat",
|
||||
"snat",
|
||||
"masquerade",
|
||||
+ "fullcone",
|
||||
"accept",
|
||||
"reject",
|
||||
"drop"
|
||||
@@ -1852,6 +1901,7 @@ return {
|
||||
}
|
||||
|
||||
let defs = this.parse_options(data, {
|
||||
+ fullcone: [ "bool", "0" ],
|
||||
input: [ "policy", "drop" ],
|
||||
output: [ "policy", "drop" ],
|
||||
forward: [ "policy", "drop" ],
|
||||
@@ -1884,6 +1934,11 @@ return {
|
||||
|
||||
delete defs.syn_flood;
|
||||
|
||||
+ if (!nft_try_fullcone()) {
|
||||
+ delete defs.fullcone;
|
||||
+ //warn("nft_try_fullcone failed, disable fullcone globally\n");
|
||||
+ }
|
||||
+
|
||||
this.state.defaults = defs;
|
||||
},
|
||||
|
||||
@@ -1908,6 +1963,8 @@ return {
|
||||
masq_dest: [ "network", null, PARSE_LIST ],
|
||||
|
||||
masq6: [ "bool" ],
|
||||
+ fullcone4: [ "bool", "0" ],
|
||||
+ fullcone6: [ "bool", "0" ],
|
||||
|
||||
extra: [ "string", null, UNSUPPORTED ],
|
||||
extra_src: [ "string", null, UNSUPPORTED ],
|
||||
@@ -1940,6 +1997,18 @@ return {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (this.state.defaults && !this.state.defaults.fullcone) {
|
||||
+ //this.warn_section(data, "fullcone in defaults not enabled, ignore zone fullcone settings");
|
||||
+ zone.fullcone4 = false;
|
||||
+ zone.fullcone6 = false;
|
||||
+ }
|
||||
+ if (zone.fullcone4) {
|
||||
+ this.myinfo_section(data, "IPv4 fullcone enabled for zone '" + zone.name + "'");
|
||||
+ }
|
||||
+ if (zone.fullcone6) {
|
||||
+ this.myinfo_section(data, "IPv6 fullcone enabled for zone '" + zone.name + "'");
|
||||
+ }
|
||||
+
|
||||
if (zone.mtu_fix && this.kernel < 0x040a0000) {
|
||||
this.warn_section(data, "option 'mtu_fix' requires kernel 4.10 or later");
|
||||
return;
|
||||
@@ -2110,10 +2179,15 @@ return {
|
||||
zone.related_subnets = related_subnets;
|
||||
zone.related_physdevs = related_physdevs;
|
||||
|
||||
+ if (zone.fullcone4 || zone.fullcone6) {
|
||||
+ zone.dflags.snat = true;
|
||||
+ zone.dflags.dnat = true;
|
||||
+ }
|
||||
+
|
||||
if (zone.masq || zone.masq6)
|
||||
zone.dflags.snat = true;
|
||||
|
||||
- if ((zone.auto_helper && !(zone.masq || zone.masq6)) || length(zone.helper)) {
|
||||
+ if ((zone.auto_helper && !(zone.masq || zone.masq6 || zone.fullcone4 || zone.fullcone6)) || length(zone.helper)) {
|
||||
zone.dflags.helper = true;
|
||||
|
||||
for (let helper in (length(zone.helper) ? zone.helper : this.state.helpers)) {
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
--- a/root/usr/share/firewall4/templates/ruleset.uc.old
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -181,7 +181,14 @@
|
||||
|
||||
chain prerouting {
|
||||
type filter hook prerouting priority filter; policy accept;
|
||||
+{% for (let rule in fw4.rules("forward")): %}
|
||||
+ {%+ include("rule.uc", { fw4, zone: (rule.src?.zone?.log_limit ? rule.src.zone : rule.dest?.zone), rule }) %}
|
||||
+{% endfor %}
|
||||
+
|
||||
{% for (let zone in fw4.zones()): %}
|
||||
+{% for (let rule in fw4.rules(`forward_${zone.name}`)): %}
|
||||
+ {%+ include("rule.uc", { fw4, zone, rule }) %}
|
||||
+{% endfor %}
|
||||
{% if (zone.dflags.helper): %}
|
||||
{% for (let rule in zone.match_rules): %}
|
||||
{% let devices_pos = fw4.filter_loopback_devs(rule.devices_pos, false); %}
|
||||
1347
6.11/package/network/services/dnsmasq/files/dnsmasq.init
Executable file
1347
6.11/package/network/services/dnsmasq/files/dnsmasq.init
Executable file
File diff suppressed because it is too large
Load diff
85
6.11/package/network/utils/nftables/Makefile
Normal file
85
6.11/package/network/utils/nftables/Makefile
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nftables
|
||||
PKG_VERSION:=1.0.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DISABLE_NLS:=
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-debug \
|
||||
--disable-man-doc \
|
||||
--with-mini-gmp \
|
||||
--without-cli \
|
||||
--disable-python
|
||||
|
||||
define Package/nftables/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Firewall
|
||||
TITLE:=nftables userspace utility
|
||||
DEPENDS:=+kmod-nft-core +libnftnl
|
||||
URL:=http://netfilter.org/projects/nftables/
|
||||
PROVIDES:=nftables
|
||||
endef
|
||||
|
||||
define Package/nftables-nojson
|
||||
$(Package/nftables/Default)
|
||||
TITLE+= no JSON support
|
||||
VARIANT:=nojson
|
||||
DEFAULT_VARIANT:=1
|
||||
CONFLICTS:=nftables-json
|
||||
endef
|
||||
|
||||
define Package/nftables-json
|
||||
$(Package/nftables/Default)
|
||||
TITLE+= with JSON support
|
||||
VARIANT:=json
|
||||
DEPENDS+=+jansson
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),json)
|
||||
CONFIGURE_ARGS += --with-json
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/nftables $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftables.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/nftables/install/Default
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
Package/nftables-nojson/install = $(Package/nftables/install/Default)
|
||||
Package/nftables-json/install = $(Package/nftables/install/Default)
|
||||
|
||||
$(eval $(call BuildPackage,nftables-nojson))
|
||||
$(eval $(call BuildPackage,nftables-json))
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
From 58c89e8768711a959fdc6e953df3ea2254ff93c1 Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 00:38:51 +0800
|
||||
Subject: [PATCH] nftables: add fullcone expression support
|
||||
|
||||
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
|
||||
---
|
||||
include/linux/netfilter/nf_tables.h | 16 ++++++++++
|
||||
include/statement.h | 1 +
|
||||
src/netlink_delinearize.c | 48 +++++++++++++++++++++++++++++
|
||||
src/netlink_linearize.c | 7 +++++
|
||||
src/parser_bison.y | 28 +++++++++++++++--
|
||||
src/scanner.l | 1 +
|
||||
src/statement.c | 1 +
|
||||
7 files changed, 100 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
|
||||
index 75df968..beab9d8 100644
|
||||
--- a/include/linux/netfilter/nf_tables.h
|
||||
+++ b/include/linux/netfilter/nf_tables.h
|
||||
@@ -1409,6 +1409,22 @@ enum nft_masq_attributes {
|
||||
};
|
||||
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
|
||||
|
||||
+/**
|
||||
+ * enum nft_fullcone_attributes - nf_tables fullcone expression attributes
|
||||
+ *
|
||||
+ * @NFTA_FULLCONE_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
|
||||
+ */
|
||||
+enum nft_fullcone_attributes {
|
||||
+ NFTA_FULLCONE_UNSPEC,
|
||||
+ NFTA_FULLCONE_FLAGS,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ __NFTA_FULLCONE_MAX
|
||||
+};
|
||||
+#define NFTA_FULLCONE_MAX (__NFTA_FULLCONE_MAX - 1)
|
||||
+
|
||||
/**
|
||||
* enum nft_redir_attributes - nf_tables redirect expression netlink attributes
|
||||
*
|
||||
diff --git a/include/statement.h b/include/statement.h
|
||||
index 2a2d300..cbd48dd 100644
|
||||
--- a/include/statement.h
|
||||
+++ b/include/statement.h
|
||||
@@ -122,6 +122,7 @@ enum nft_nat_etypes {
|
||||
__NFT_NAT_SNAT = NFT_NAT_SNAT,
|
||||
__NFT_NAT_DNAT = NFT_NAT_DNAT,
|
||||
NFT_NAT_MASQ,
|
||||
+ NFT_NAT_FULLCONE,
|
||||
NFT_NAT_REDIR,
|
||||
};
|
||||
|
||||
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
|
||||
index 068c3bb..8513113 100644
|
||||
--- a/src/netlink_delinearize.c
|
||||
+++ b/src/netlink_delinearize.c
|
||||
@@ -1369,6 +1369,53 @@ static void netlink_parse_masq(struct netlink_parse_ctx *ctx,
|
||||
stmt_free(stmt);
|
||||
}
|
||||
|
||||
+static void netlink_parse_fullcone(struct netlink_parse_ctx *ctx,
|
||||
+ const struct location *loc,
|
||||
+ const struct nftnl_expr *nle)
|
||||
+{
|
||||
+ enum nft_registers reg1, reg2;
|
||||
+ struct expr *proto;
|
||||
+ struct stmt *stmt;
|
||||
+ uint32_t flags = 0;
|
||||
+
|
||||
+ if (nftnl_expr_is_set(nle, NFTNL_EXPR_FULLCONE_FLAGS))
|
||||
+ flags = nftnl_expr_get_u32(nle, NFTNL_EXPR_FULLCONE_FLAGS);
|
||||
+
|
||||
+ stmt = nat_stmt_alloc(loc, NFT_NAT_FULLCONE);
|
||||
+ stmt->nat.flags = flags;
|
||||
+
|
||||
+ reg1 = netlink_parse_register(nle, NFTNL_EXPR_FULLCONE_REG_PROTO_MIN);
|
||||
+ if (reg1) {
|
||||
+ proto = netlink_get_register(ctx, loc, reg1);
|
||||
+ if (proto == NULL) {
|
||||
+ netlink_error(ctx, loc,
|
||||
+ "fullcone statement has no proto expression");
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+ expr_set_type(proto, &inet_service_type, BYTEORDER_BIG_ENDIAN);
|
||||
+ stmt->nat.proto = proto;
|
||||
+ }
|
||||
+
|
||||
+ reg2 = netlink_parse_register(nle, NFTNL_EXPR_FULLCONE_REG_PROTO_MAX);
|
||||
+ if (reg2 && reg2 != reg1) {
|
||||
+ proto = netlink_get_register(ctx, loc, reg2);
|
||||
+ if (proto == NULL) {
|
||||
+ netlink_error(ctx, loc,
|
||||
+ "fullcone statement has no proto expression");
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+ expr_set_type(proto, &inet_service_type, BYTEORDER_BIG_ENDIAN);
|
||||
+ if (stmt->nat.proto != NULL)
|
||||
+ proto = range_expr_alloc(loc, stmt->nat.proto, proto);
|
||||
+ stmt->nat.proto = proto;
|
||||
+ }
|
||||
+
|
||||
+ ctx->stmt = stmt;
|
||||
+ return;
|
||||
+out_err:
|
||||
+ stmt_free(stmt);
|
||||
+}
|
||||
+
|
||||
static void netlink_parse_redir(struct netlink_parse_ctx *ctx,
|
||||
const struct location *loc,
|
||||
const struct nftnl_expr *nle)
|
||||
@@ -1787,6 +1834,7 @@ static const struct expr_handler netlink_parsers[] = {
|
||||
{ .name = "tproxy", .parse = netlink_parse_tproxy },
|
||||
{ .name = "notrack", .parse = netlink_parse_notrack },
|
||||
{ .name = "masq", .parse = netlink_parse_masq },
|
||||
+ { .name = "fullcone", .parse = netlink_parse_fullcone },
|
||||
{ .name = "redir", .parse = netlink_parse_redir },
|
||||
{ .name = "dup", .parse = netlink_parse_dup },
|
||||
{ .name = "queue", .parse = netlink_parse_queue },
|
||||
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
|
||||
index c8bbcb7..505eafa 100644
|
||||
--- a/src/netlink_linearize.c
|
||||
+++ b/src/netlink_linearize.c
|
||||
@@ -1140,6 +1140,13 @@ static void netlink_gen_nat_stmt(struct netlink_linearize_ctx *ctx,
|
||||
nftnl_reg_pmin = NFTNL_EXPR_MASQ_REG_PROTO_MIN;
|
||||
nftnl_reg_pmax = NFTNL_EXPR_MASQ_REG_PROTO_MAX;
|
||||
break;
|
||||
+ case NFT_NAT_FULLCONE:
|
||||
+ nle = alloc_nft_expr("fullcone");
|
||||
+
|
||||
+ nftnl_flag_attr = NFTNL_EXPR_FULLCONE_FLAGS;
|
||||
+ nftnl_reg_pmin = NFTNL_EXPR_FULLCONE_REG_PROTO_MIN;
|
||||
+ nftnl_reg_pmax = NFTNL_EXPR_FULLCONE_REG_PROTO_MAX;
|
||||
+ break;
|
||||
case NFT_NAT_REDIR:
|
||||
nle = alloc_nft_expr("redir");
|
||||
|
||||
diff --git a/src/parser_bison.y b/src/parser_bison.y
|
||||
index ca5c488..ec9fc9b 100644
|
||||
--- a/src/parser_bison.y
|
||||
+++ b/src/parser_bison.y
|
||||
@@ -571,6 +571,7 @@ int nft_lex(void *, void *, void *);
|
||||
%token SNAT "snat"
|
||||
%token DNAT "dnat"
|
||||
%token MASQUERADE "masquerade"
|
||||
+%token FULLCONE "fullcone"
|
||||
%token REDIRECT "redirect"
|
||||
%token RANDOM "random"
|
||||
%token FULLY_RANDOM "fully-random"
|
||||
@@ -703,8 +704,8 @@ int nft_lex(void *, void *, void *);
|
||||
%type <val> limit_burst_pkts limit_burst_bytes limit_mode limit_bytes time_unit quota_mode
|
||||
%type <stmt> reject_stmt reject_stmt_alloc
|
||||
%destructor { stmt_free($$); } reject_stmt reject_stmt_alloc
|
||||
-%type <stmt> nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
-%destructor { stmt_free($$); } nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
+%type <stmt> nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc fullcone_stmt fullcone_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
+%destructor { stmt_free($$); } nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc fullcone_stmt fullcone_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
%type <val> nf_nat_flags nf_nat_flag offset_opt
|
||||
%type <stmt> tproxy_stmt
|
||||
%destructor { stmt_free($$); } tproxy_stmt
|
||||
@@ -2853,6 +2854,7 @@ stmt : verdict_stmt
|
||||
| queue_stmt
|
||||
| ct_stmt
|
||||
| masq_stmt close_scope_nat
|
||||
+ | fullcone_stmt close_scope_nat
|
||||
| redir_stmt close_scope_nat
|
||||
| dup_stmt close_scope_dup
|
||||
| fwd_stmt close_scope_fwd
|
||||
@@ -3753,6 +3755,28 @@ masq_stmt_args : TO COLON stmt_expr
|
||||
}
|
||||
;
|
||||
|
||||
+fullcone_stmt : fullcone_stmt_alloc fullcone_stmt_args
|
||||
+ | fullcone_stmt_alloc
|
||||
+ ;
|
||||
+
|
||||
+fullcone_stmt_alloc : FULLCONE { $$ = nat_stmt_alloc(&@$, NFT_NAT_FULLCONE); }
|
||||
+ ;
|
||||
+
|
||||
+fullcone_stmt_args : TO COLON stmt_expr
|
||||
+ {
|
||||
+ $<stmt>0->nat.proto = $3;
|
||||
+ }
|
||||
+ | TO COLON stmt_expr nf_nat_flags
|
||||
+ {
|
||||
+ $<stmt>0->nat.proto = $3;
|
||||
+ $<stmt>0->nat.flags = $4;
|
||||
+ }
|
||||
+ | nf_nat_flags
|
||||
+ {
|
||||
+ $<stmt>0->nat.flags = $1;
|
||||
+ }
|
||||
+ ;
|
||||
+
|
||||
redir_stmt : redir_stmt_alloc redir_stmt_arg
|
||||
| redir_stmt_alloc
|
||||
;
|
||||
diff --git a/src/scanner.l b/src/scanner.l
|
||||
index 2154281..c389860 100644
|
||||
--- a/src/scanner.l
|
||||
+++ b/src/scanner.l
|
||||
@@ -453,6 +453,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
|
||||
"snat" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return SNAT; }
|
||||
"dnat" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return DNAT; }
|
||||
"masquerade" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return MASQUERADE; }
|
||||
+"fullcone" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return FULLCONE; }
|
||||
"redirect" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return REDIRECT; }
|
||||
"random" { return RANDOM; }
|
||||
<SCANSTATE_STMT_NAT>{
|
||||
diff --git a/src/statement.c b/src/statement.c
|
||||
index 30caf9c..f4866c2 100644
|
||||
--- a/src/statement.c
|
||||
+++ b/src/statement.c
|
||||
@@ -650,6 +650,7 @@ const char *nat_etype2str(enum nft_nat_etypes type)
|
||||
[NFT_NAT_SNAT] = "snat",
|
||||
[NFT_NAT_DNAT] = "dnat",
|
||||
[NFT_NAT_MASQ] = "masquerade",
|
||||
+ [NFT_NAT_FULLCONE] = "fullcone",
|
||||
[NFT_NAT_REDIR] = "redirect",
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue