From 1ef4c6a5c6dab6aded39c204a0a20d01b8cb2690 Mon Sep 17 00:00:00 2001 From: sbwml Date: Wed, 3 May 2023 01:10:12 +0800 Subject: [PATCH] luci-app-mosdns: fix mosdns service increase buffer size * daemon.err mosdns[7923]: 2023/05/03 00:46:35 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details. --- luci-app-mosdns/Makefile | 10 +++++++++- .../root/etc/sysctl.d/20-mosdns-buffer-increase.conf | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 luci-app-mosdns/root/etc/sysctl.d/20-mosdns-buffer-increase.conf diff --git a/luci-app-mosdns/Makefile b/luci-app-mosdns/Makefile index b1c497f..f1d59cc 100644 --- a/luci-app-mosdns/Makefile +++ b/luci-app-mosdns/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-mosdns -PKG_VERSION:=1.5.3 +PKG_VERSION:=1.5.4 PKG_RELEASE:=1 LUCI_TITLE:=LuCI Support for mosdns @@ -15,6 +15,14 @@ define Package/$(PKG_NAME)/conffiles /etc/mosdns/rule endef +define Package/$(PKG_NAME)/postinst +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + sysctl -p /etc/sysctl.d/20-mosdns-buffer-increase.conf + exit 0 +} +endef + include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-mosdns/root/etc/sysctl.d/20-mosdns-buffer-increase.conf b/luci-app-mosdns/root/etc/sysctl.d/20-mosdns-buffer-increase.conf new file mode 100644 index 0000000..18f2527 --- /dev/null +++ b/luci-app-mosdns/root/etc/sysctl.d/20-mosdns-buffer-increase.conf @@ -0,0 +1,5 @@ +# Do not edit, changes to this file will be lost on upgrades +# /etc/sysctl.conf can be used to customize sysctl settings + +net.core.rmem_max=4194304 +net.core.wmem_max=4194304