Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  kernel: kmod-ipt-ulog: Remove package
  rockchip: fix opc-h68k tf boot fail on some cards
  dnsmasq: bump to v2.8.7
  silicon: fix kernel target
  kernel: Refresh kernel 5.10
  kernel: refresh linux 6.1 patches
  treewide: remove kernel 6.0 support
  sunxi: add kernel 5.10 support
  mac80211: backport ath11k in linux kernel 6.1
  • Loading branch information
github-actions[bot] committed Dec 14, 2022
2 parents 4fb08be + 557fbb8 commit 896488b
Show file tree
Hide file tree
Showing 209 changed files with 1,328 additions and 38,838 deletions.
2 changes: 0 additions & 2 deletions include/kernel-6.0

This file was deleted.

7 changes: 0 additions & 7 deletions include/netfilter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_IRC, $(P_XT)nf_connt
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc))


# ulog

$(eval $(call nf_add,IPT_ULOG,CONFIG_IP_NF_TARGET_ULOG, $(P_V4)ipt_ULOG))


# nflog

$(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG))
Expand Down Expand Up @@ -321,7 +316,6 @@ $(eval $(call nf_add,EBTABLES_IP4,CONFIG_BRIDGE_EBT_SNAT, $(P_EBT)ebt_snat))

# watchers
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log))
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_ULOG, $(P_EBT)ebt_ulog))
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog))
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue))

Expand Down Expand Up @@ -393,7 +387,6 @@ IPT_BUILTIN += $(IPT_NAT6-y)
IPT_BUILTIN += $(IPT_NAT_EXTRA-y)
IPT_BUILTIN += $(NF_NATHELPER-y)
IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y)
IPT_BUILTIN += $(IPT_ULOG-y)
IPT_BUILTIN += $(IPT_TPROXY-y)
IPT_BUILTIN += $(NFNETLINK-y)
IPT_BUILTIN += $(NFNETLINK_LOG-y)
Expand Down
8 changes: 4 additions & 4 deletions package/kernel/linux/modules/fs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ define KernelPackage/fs-cifs
+kmod-crypto-ccm \
+kmod-crypto-ecb \
+kmod-crypto-des \
+(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-oid-registry \
+(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-dnsresolver
+(LINUX_5_15||LINUX_6_1):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_6_1):kmod-oid-registry \
+(LINUX_5_15||LINUX_6_1):kmod-dnsresolver
endef

define KernelPackage/fs-cifs/description
Expand Down Expand Up @@ -530,7 +530,7 @@ $(eval $(call KernelPackage,fs-ntfs))
define KernelPackage/fs-ntfs3
SUBMENU:=$(FS_MENU)
TITLE:=NTFS3 Read-Write file system support
DEPENDS:=@(LINUX_5_4||LINUX_5_10||LINUX_5_15||LINUX_6_0||LINUX_6_1) +kmod-nls-base
DEPENDS:= +kmod-nls-base
KCONFIG:= \
CONFIG_NTFS3_FS \
CONFIG_NTFS3_64BIT_CLUSTER=y \
Expand Down
6 changes: 3 additions & 3 deletions package/kernel/linux/modules/netdevices.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ $(eval $(call KernelPackage,mii))
define KernelPackage/mdio-devres
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Supports MDIO device registration
DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_6_0||LINUX_6_1) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio
DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_6_1) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio
KCONFIG:=CONFIG_MDIO_DEVRES
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko
Expand Down Expand Up @@ -597,7 +597,7 @@ $(eval $(call KernelPackage,8139cp))
define KernelPackage/r8169
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-mdio-devres
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_6_1):kmod-mdio-devres
KCONFIG:= \
CONFIG_R8169 \
CONFIG_R8169_NAPI=y \
Expand Down Expand Up @@ -723,7 +723,7 @@ $(eval $(call KernelPackage,igbvf))
define KernelPackage/ixgbe
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-mdio-devres
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_6_1):kmod-mdio-devres
KCONFIG:=CONFIG_IXGBE \
CONFIG_IXGBE_VXLAN=n \
CONFIG_IXGBE_HWMON=y \
Expand Down
17 changes: 0 additions & 17 deletions package/kernel/linux/modules/netfilter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -604,23 +604,6 @@ endef
$(eval $(call KernelPackage,nf-nathelper-extra))


define KernelPackage/ipt-ulog
TITLE:=Module for user-space packet logging
KCONFIG:=$(KCONFIG_IPT_ULOG)
FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
$(call AddDepends/ipt)
endef

define KernelPackage/ipt-ulog/description
Netfilter (IPv4) module for user-space packet logging
Includes:
- ULOG
endef

$(eval $(call KernelPackage,ipt-ulog))


define KernelPackage/ipt-nflog
TITLE:=Module for user-space packet logging
KCONFIG:=$(KCONFIG_IPT_NFLOG)
Expand Down
4 changes: 2 additions & 2 deletions package/kernel/linux/modules/netsupport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1356,11 +1356,11 @@ define KernelPackage/qrtr
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Qualcomm IPC Router support
HIDDEN:=1
DEPENDS:=@(LINUX_5_15||LINUX_6_0)
DEPENDS:=@(LINUX_5_15||LINUX_6_1)
KCONFIG:=CONFIG_QRTR
FILES:= \
$(LINUX_DIR)/net/qrtr/qrtr.ko \
$(LINUX_DIR)/net/qrtr/ns.ko
$(LINUX_DIR)/net/qrtr/ns.ko@lt6.0
AUTOLOAD:=$(call AutoProbe,qrtr)
endef

Expand Down
6 changes: 3 additions & 3 deletions package/kernel/linux/modules/other.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,8 @@ $(eval $(call KernelPackage,keys-trusted))
define KernelPackage/tpm
SUBMENU:=$(OTHER_MENU)
TITLE:=TPM Hardware Support
DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-asn1-encoder +(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-oid-registry
DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_6_1):kmod-asn1-decoder \
+(LINUX_5_15||LINUX_6_1):kmod-asn1-encoder +(LINUX_5_15||LINUX_6_1):kmod-oid-registry
KCONFIG:= CONFIG_TCG_TPM
FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko
AUTOLOAD:=$(call AutoLoad,10,tpm,1)
Expand Down Expand Up @@ -1283,7 +1283,7 @@ $(eval $(call KernelPackage,qcom-qmi-helpers))
define KernelPackage/mhi
SUBMENU:=$(OTHER_MENU)
TITLE:=Modem Host Interface (MHI) bus
DEPENDS:=@(LINUX_5_15||LINUX_6_0||LINUX_6_1)
DEPENDS:=@(LINUX_5_15||LINUX_6_1)
KCONFIG:=CONFIG_MHI_BUS \
CONFIG_MHI_BUS_DEBUG=y \
CONFIG_MHI_BUS_PCI_GENERIC=n \
Expand Down
4 changes: 2 additions & 2 deletions package/kernel/linux/modules/usb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,8 @@ $(eval $(call KernelPackage,usb-net-aqc111))

define KernelPackage/usb-net-asix
TITLE:=Kernel module for USB-to-Ethernet Asix convertors
DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-mdio-devres
DEPENDS:=+(LINUX_5_4||LINUX_5_10):kmod-libphy \
+(LINUX_5_15||LINUX_6_1):kmod-mdio-devres +LINUX_6_1:kmod-phylink
KCONFIG:=CONFIG_USB_NET_AX8817X
FILES:= \
$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko \
Expand All @@ -1153,7 +1154,6 @@ endef

$(eval $(call KernelPackage,usb-net-asix))


define KernelPackage/usb-net-asix-ax88179
TITLE:=Kernel module for USB-to-Gigabit-Ethernet Asix convertors
DEPENDS:=+kmod-libphy
Expand Down
10 changes: 5 additions & 5 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ define KernelPackage/drm
TITLE:=Direct Rendering Manager (DRM) support
HIDDEN:=1
DEPENDS:=+kmod-dma-buf +kmod-i2c-core +kmod-i2c-algo-bit +kmod-backlight \
+(LINUX_5_15||LINUX_6_0||LINUX_6_1):kmod-fb
+(LINUX_5_15||LINUX_6_1):kmod-fb
KCONFIG:= \
CONFIG_DRM \
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y \
Expand All @@ -268,7 +268,7 @@ $(eval $(call KernelPackage,drm))
define KernelPackage/drm-buddy
SUBMENU:=$(VIDEO_MENU)
TITLE:=A page based buddy allocator
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-drm @(LINUX_6_0||LINUX_6_1)
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-drm @LINUX_6_1
KCONFIG:=CONFIG_DRM_BUDDY
FILES:= $(LINUX_DIR)/drivers/gpu/drm/drm_buddy.ko
AUTOLOAD:=$(call AutoProbe,drm_buddy)
Expand Down Expand Up @@ -313,7 +313,7 @@ $(eval $(call KernelPackage,drm-kms-helper))
define KernelPackage/drm-display-helper
SUBMENU:=$(VIDEO_MENU)
TITLE:=DRM helpers for display adapters drivers
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm +TARGET_x86:kmod-drm-buddy @(LINUX_6_0||LINUX_6_1)
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm +TARGET_x86:kmod-drm-buddy @LINUX_6_1
KCONFIG:=CONFIG_DRM_DISPLAY_HELPER
FILES:=$(LINUX_DIR)/drivers/gpu/drm/display/drm_display_helper.ko
AUTOLOAD:=$(call AutoProbe,drm_display_helper)
Expand All @@ -330,7 +330,7 @@ define KernelPackage/drm-amdgpu
TITLE:=AMDGPU DRM support
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
+kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware \
+(LINUX_6_0||LINUX_6_1):kmod-drm-display-helper
+LINUX_6_1:kmod-drm-display-helper
KCONFIG:=CONFIG_DRM_AMDGPU \
CONFIG_DRM_AMDGPU_SI=y \
CONFIG_DRM_AMDGPU_CIK=y \
Expand Down Expand Up @@ -1105,7 +1105,7 @@ define KernelPackage/drm-i915
SUBMENU:=$(VIDEO_MENU)
TITLE:=Intel GPU drm support
DEPENDS:=@TARGET_x86 +kmod-drm-ttm +kmod-drm-kms-helper +i915-firmware \
+(LINUX_6_0||LINUX_6_1):kmod-drm-display-helper
+LINUX_6_1:kmod-drm-display-helper
KCONFIG:= \
CONFIG_INTEL_GTT \
CONFIG_DRM_I915 \
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211

PKG_VERSION:=5.15.33-1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.33/
PKG_HASH:=1b6b3bded4c81814ebebe2d194c2f8966d2399005b85ebb0557285b6e73f5422

Expand Down
4 changes: 2 additions & 2 deletions package/kernel/mac80211/ath.mk
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ define KernelPackage/ath11k-ahb
$(call KernelPackage/mac80211/Default)
TITLE:=Qualcomm 802.11ax AHB wireless chipset support
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
DEPENDS+= @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-ath11k +LINUX_5_15:kmod-qrtr-smd
DEPENDS+= @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-ath11k +(LINUX_5_15||LINUX_6_1):kmod-qrtr-smd
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko
AUTOLOAD:=$(call AutoProbe,ath11k_ahb)
endef
Expand All @@ -390,7 +390,7 @@ define KernelPackage/ath11k-pci
$(call KernelPackage/mac80211/Default)
TITLE:=Qualcomm 802.11ax PCI wireless chipset support
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
DEPENDS+= @PCI_SUPPORT +LINUX_5_15:kmod-qrtr-mhi +kmod-ath11k
DEPENDS+= @PCI_SUPPORT +(LINUX_5_15||LINUX_6_1):kmod-qrtr-mhi +kmod-ath11k
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko
AUTOLOAD:=$(call AutoProbe,ath11k_pci)
endef
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--- a/drivers/net/wireless/ath/ath11k/pci.c
--- b/drivers/net/wireless/ath/ath11k/pci.c
@@ -427,7 +427,11 @@
pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO,
&ab->pci.msi.addr_lo);

+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
if (msi_desc->msi_attrib.is_64) {
+#else
+ if (msi_desc->pci.msi_attrib.is_64) {
+#endif
pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI,
&ab->pci.msi.addr_hi);
} else {
--- a/drivers/net/wireless/ath/ath11k/pcic.c
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
@@ -548,8 +548,13 @@
irq_grp->ab = ab;
irq_grp->grp_id = i;
init_dummy_netdev(&irq_grp->napi_ndev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
ath11k_pcic_ext_grp_napi_poll, NAPI_POLL_WEIGHT);
+#else
+ netif_napi_add_weight(&irq_grp->napi_ndev, &irq_grp->napi,
+ ath11k_pcic_ext_grp_napi_poll, NAPI_POLL_WEIGHT);
+#endif

if (ab->hw_params.ring_mask->tx[i] ||
ab->hw_params.ring_mask->rx[i] ||
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -1035,8 +1035,12 @@
return -EADDRNOTAVAIL;
}

+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
flags & MSG_DONTWAIT, &rc);
+#else
+ skb = skb_recv_datagram(sk, flags, &rc);
+#endif
if (!skb) {
release_sock(sk);
return rc;
21 changes: 14 additions & 7 deletions package/network/services/dnsmasq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=dnsmasq
PKG_UPSTREAM_VERSION:=2.86
PKG_UPSTREAM_VERSION:=2.87
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq
PKG_HASH:=28d52cfc9e2004ac4f85274f52b32e1647b4dbc9761b82e7de1e41c49907eb08
PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
PKG_HASH:=0228c0364a7f2356fd7e7f1549937cbf3099a78d3b2eb1ba5bb0c31e2b89de7a

PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
Expand All @@ -30,6 +30,7 @@ PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcp \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_nftset \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_conntrack \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_noid \
CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_broken_rtc \
Expand Down Expand Up @@ -61,10 +62,11 @@ endef

define Package/dnsmasq-full
$(call Package/dnsmasq/Default)
TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset, Conntrack, NO_ID enabled by default)
TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset, Nftset, Conntrack, NO_ID enabled by default)
DEPENDS+=+PACKAGE_dnsmasq_full_dnssec:libnettle \
+PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset \
+PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack
+PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack \
+PACKAGE_dnsmasq_full_nftset:nftables-json
VARIANT:=full
PROVIDES:=dnsmasq
endef
Expand All @@ -83,7 +85,7 @@ define Package/dnsmasq-full/description
$(call Package/dnsmasq/description)

This is a fully configurable variant with DHCPv4, DHCPv6, DNSSEC, Authoritative DNS
and IPset, Conntrack support & NO_ID enabled by default.
and nftset, Conntrack support & NO_ID enabled by default.
endef

define Package/dnsmasq/conffiles
Expand All @@ -100,7 +102,7 @@ define Package/dnsmasq-full/config
config PACKAGE_dnsmasq_full_dhcpv6
bool "Build with DHCPv6 support."
depends on IPV6 && PACKAGE_dnsmasq_full_dhcp
default n
default y
config PACKAGE_dnsmasq_full_dnssec
bool "Build with DNSSEC support."
default n
Expand All @@ -110,6 +112,9 @@ define Package/dnsmasq-full/config
config PACKAGE_dnsmasq_full_ipset
bool "Build with IPset support."
default y
config PACKAGE_dnsmasq_full_nftset
bool "Build with Nftset support."
default n
config PACKAGE_dnsmasq_full_conntrack
bool "Build with Conntrack support."
default n
Expand Down Expand Up @@ -144,6 +149,7 @@ ifeq ($(BUILD_VARIANT),full)
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec),-DHAVE_DNSSEC) \
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth),,-DNO_AUTH) \
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset),,-DNO_IPSET) \
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_nftset),-DHAVE_NFTSET,) \
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_conntrack),-DHAVE_CONNTRACK,) \
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_noid),-DNO_ID,) \
$(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_broken_rtc),-DHAVE_BROKEN_RTC) \
Expand Down Expand Up @@ -182,6 +188,7 @@ define Package/dnsmasq/install
$(INSTALL_DATA) ./files/dnsmasq_acl.json $(1)/usr/share/acl.d/
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/50-dnsmasq-migrate-resolv-conf-auto.sh $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/50-dnsmasq-migrate-ipset.sh $(1)/etc/uci-defaults
endef

Package/dnsmasq-dhcpv6/install = $(Package/dnsmasq/install)
Expand Down
32 changes: 32 additions & 0 deletions package/network/services/dnsmasq/files/50-dnsmasq-migrate-ipset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

ipsets=$(uci -q get dhcp.@dnsmasq[0].ipset)
[ -z "$ipsets" ] && exit 0

for ipset in $ipsets; do
names=${ipset##*/}
domains=${ipset%/*}

[ -z "$names" ] || [ -z "$domains" ] && continue

uci add dhcp ipset

OLDIFS="$IFS"

IFS=","
for name in $names; do
uci add_list dhcp.@ipset[-1].name="$name"
done

IFS="/"
for domain in ${domains:1}; do
uci add_list dhcp.@ipset[-1].domain="$domain"
done

IFS="$OLDIFS"

uci del_list dhcp.@dnsmasq[0].ipset="$ipset"
done

uci commit dhcp
exit 0
Loading

0 comments on commit 896488b

Please sign in to comment.