diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index 282e8f17f0..0c81c46a89 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -10,13 +10,14 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp PKG_VERSION:=2.4.7 -PKG_RELEASE:=12 +PKG_RELEASE:=13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/ PKG_HASH:=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-4-Clause +PKG_CPE_ID:=cpe:/a:samba:ppp PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) @@ -177,14 +178,19 @@ $(call Build/Configure/Default,, \ UNAME_M="$(ARCH)" \ ) mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux - cp \ + $(CP) \ $(LINUX_DIR)/include/linux/compiler.h \ $(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \ $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/ + + # Kernel 4.14.9+ only, ignore the exit status of cp in case the file + # doesn't exits + -$(CP) $(LINUX_DIR)/include/linux/compiler_types.h \ + $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/ endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -flto -fuse-linker-plugin MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \ PRECOMPILED_FILTER=1 \ diff --git a/package/network/services/ppp/files/etc/ppp/options b/package/network/services/ppp/files/etc/ppp/options index 6b93f7bdb6..dbb2bdb3e2 100644 --- a/package/network/services/ppp/files/etc/ppp/options +++ b/package/network/services/ppp/files/etc/ppp/options @@ -6,5 +6,3 @@ nopcomp nocrtscts lock maxfail 0 -lcp-echo-failure 5 -lcp-echo-interval 1 diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh index 875714b353..b56b83c72d 100755 --- a/package/network/services/ppp/files/ppp.sh +++ b/package/network/services/ppp/files/ppp.sh @@ -120,6 +120,8 @@ ppp_generic_setup() { } } + [ -n "$keepalive" ] || keepalive="5 1" + local lcp_failure="${keepalive%%[, ]*}" local lcp_interval="${keepalive##*[, ]}" local lcp_adaptive="lcp-echo-adaptive" @@ -223,15 +225,14 @@ proto_pppoe_setup() { json_get_var service service json_get_var host_uniq host_uniq -#By 蝈蝈:并发拨号同步的前期准备 +#By 壺ͬǰ׼ syncppp_option="" [ "$(uci get syncdial.config.enabled)" == "1" ] && { ppp_if_cnt=$(cat /etc/config/network | grep -c "proto 'pppoe'") syncppp_option="syncppp $ppp_if_cnt" shellsync $ppp_if_cnt 10 } - - ppp_generic_setup "$config" \ + ppp_generic_setup "$config" \ $syncppp_option \ plugin rp-pppoe.so \ ${ac:+rp_pppoe_ac "$ac"} \ diff --git a/package/network/services/ppp/patches/001-honor-ldflags.patch b/package/network/services/ppp/patches/001-honor-ldflags.patch index 1328811537..fae66a5ec7 100644 --- a/package/network/services/ppp/patches/001-honor-ldflags.patch +++ b/package/network/services/ppp/patches/001-honor-ldflags.patch @@ -5,15 +5,15 @@ radius.so: radius.o libradiusclient.a - $(CC) -o radius.so -shared radius.o libradiusclient.a -+ $(CC) $(COPTS) -o radius.so -shared radius.o libradiusclient.a ++ $(CC) $(CFLAGS) -o radius.so -shared radius.o libradiusclient.a radattr.so: radattr.o - $(CC) -o radattr.so -shared radattr.o -+ $(CC) $(COPTS) -o radattr.so -shared radattr.o ++ $(CC) $(CFLAGS) -o radattr.so -shared radattr.o radrealms.so: radrealms.o - $(CC) -o radrealms.so -shared radrealms.o -+ $(CC) $(COPTS) -o radrealms.so -shared radrealms.o ++ $(CC) $(CFLAGS) -o radrealms.so -shared radrealms.o CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \ clientid.o sendserver.o lock.o util.o md5.o diff --git a/package/network/services/ppp/patches/203-opt_flags.patch b/package/network/services/ppp/patches/203-opt_flags.patch index d0eb918299..069b8585f3 100644 --- a/package/network/services/ppp/patches/203-opt_flags.patch +++ b/package/network/services/ppp/patches/203-opt_flags.patch @@ -30,3 +30,14 @@ Signed-off-by: Jo-Philipp Wich OBJS = pppdump.o bsd-comp.o deflate.o zlib.o INSTALL= install +--- a/pppd/plugins/rp-pppoe/Makefile.linux ++++ b/pppd/plugins/rp-pppoe/Makefile.linux +@@ -39,7 +39,7 @@ debug.o: debug.c + $(CC) $(CFLAGS) -c -o debug.o debug.c + + rp-pppoe.so: plugin.o discovery.o if.o common.o +- $(CC) $(CFLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o ++ $(CC) $(CFLAGS) -fPIC -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o + + install: all + $(INSTALL) -d -m 755 $(LIBDIR) diff --git a/package/network/services/ppp/patches/500-add-pptp-plugin.patch b/package/network/services/ppp/patches/500-add-pptp-plugin.patch index d984e1b162..5ed861d545 100644 --- a/package/network/services/ppp/patches/500-add-pptp-plugin.patch +++ b/package/network/services/ppp/patches/500-add-pptp-plugin.patch @@ -1064,7 +1064,7 @@ + struct in_addr localbind); --- /dev/null +++ b/pppd/plugins/pptp/pptp_ctrl.c -@@ -0,0 +1,1077 @@ +@@ -0,0 +1,1078 @@ +/* pptp_ctrl.c ... handle PPTP control connection. + * C. Scott Ananian + * @@ -1083,6 +1083,7 @@ +#include +#include +#include ++#include "pppd.h" +#include "pptp_msg.h" +#include "pptp_ctrl.h" +#include "pptp_options.h" diff --git a/package/network/services/ppp/patches/511-pptp_cflags.patch b/package/network/services/ppp/patches/511-pptp_cflags.patch new file mode 100644 index 0000000000..548bf41c1f --- /dev/null +++ b/package/network/services/ppp/patches/511-pptp_cflags.patch @@ -0,0 +1,11 @@ +--- a/pppd/plugins/pptp/Makefile.linux ++++ b/pppd/plugins/pptp/Makefile.linux +@@ -20,7 +20,7 @@ all: pptp.so + $(CC) $(CFLAGS) -c -o $@ $< + + pptp.so: dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o +- $(CC) -o pptp.so -shared dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o ++ $(CC) -fPIC -o pptp.so -shared dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o + + install: all + $(INSTALL) -d -m 755 $(LIBDIR) diff --git a/target/linux/ar71xx/config-4.14 b/target/linux/ar71xx/config-4.14 index 535b5195cd..61290b5152 100644 --- a/target/linux/ar71xx/config-4.14 +++ b/target/linux/ar71xx/config-4.14 @@ -483,3 +483,4 @@ CONFIG_SYS_SUPPORTS_ZBOOT=y CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_USB_SUPPORT=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 8d25692ec8..28ca1a1964 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -282,6 +282,8 @@ CONFIG_ATH79=y # CONFIG_ATH79_PCI_ATH9K_FIXUP is not set # CONFIG_ATH79_ROUTERBOOT is not set CONFIG_ATH79_WDT=y +CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_CEVT_R4K=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLONE_BACKWARDS=y @@ -397,6 +399,7 @@ CONFIG_MIPS_ASID_SHIFT=0 CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y +CONFIG_MIPS_FPU_EMULATOR=y # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 CONFIG_MIPS_MACHINE=y @@ -452,6 +455,7 @@ CONFIG_RTL8367_PHY=y # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_NR_UARTS=1 CONFIG_SERIAL_8250_RUNTIME_UARTS=1 +# CONFIG_SHORTCUT_FE is not set # CONFIG_SOC_AR71XX is not set # CONFIG_SOC_AR724X is not set # CONFIG_SOC_AR913X is not set diff --git a/target/linux/ath79/config-4.14 b/target/linux/ath79/config-4.14 index a8349040a1..2b0cd4fe50 100644 --- a/target/linux/ath79/config-4.14 +++ b/target/linux/ath79/config-4.14 @@ -230,3 +230,4 @@ CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_SRCU=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9 index 77cf3b5dc8..fe9310bd8c 100644 --- a/target/linux/generic/config-4.9 +++ b/target/linux/generic/config-4.9 @@ -1003,7 +1003,8 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_WX is not set # CONFIG_DEBUG_ZBOOT is not set # CONFIG_DECNET is not set -CONFIG_DEFAULT_CUBIC=y +CONFIG_DEFAULT_BBR=y +# CONFIG_DEFAULT_CUBIC is not set CONFIG_DEFAULT_DEADLINE=y CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_DEFAULT_IOSCHED="deadline" @@ -1012,7 +1013,8 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_SECURITY="" CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_DEFAULT_TCP_CONG="cubic" +CONFIG_DEFAULT_TCP_CONG="bbr" +# CONFIG_DEFAULT_VEGAS is not set CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # CONFIG_DELL_RBTN is not set # CONFIG_DELL_SMO8800 is not set @@ -4505,7 +4507,7 @@ CONFIG_SYSVIPC_SYSCTL=y # CONFIG_TCG_XEN is not set # CONFIG_TCIC is not set CONFIG_TCP_CONG_ADVANCED=y -# CONFIG_TCP_CONG_BBR is not set +CONFIG_TCP_CONG_BBR=y # CONFIG_TCP_CONG_BIC is not set # CONFIG_TCP_CONG_CDG is not set CONFIG_TCP_CONG_CUBIC=y @@ -4517,10 +4519,10 @@ CONFIG_TCP_CONG_CUBIC=y # CONFIG_TCP_CONG_LP is not set # CONFIG_TCP_CONG_NV is not set # CONFIG_TCP_CONG_SCALABLE is not set -# CONFIG_TCP_CONG_VEGAS is not set +CONFIG_TCP_CONG_VEGAS=y # CONFIG_TCP_CONG_VENO is not set # CONFIG_TCP_CONG_WESTWOOD is not set -# CONFIG_TCP_CONG_YEAH is not set +CONFIG_TCP_CONG_YEAH=y # CONFIG_TCP_MD5SIG is not set # CONFIG_TCS3414 is not set # CONFIG_TCS3472 is not set diff --git a/target/linux/ramips/mt7620/config-4.14 b/target/linux/ramips/mt7620/config-4.14 index 1162ed47b2..bc68005cc9 100644 --- a/target/linux/ramips/mt7620/config-4.14 +++ b/target/linux/ramips/mt7620/config-4.14 @@ -233,3 +233,4 @@ CONFIG_TINY_SRCU=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_WATCHDOG_CORE=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/ramips/mt7621/config-4.14 b/target/linux/ramips/mt7621/config-4.14 index 0e06023780..c4daff7813 100644 --- a/target/linux/ramips/mt7621/config-4.14 +++ b/target/linux/ramips/mt7621/config-4.14 @@ -287,3 +287,4 @@ CONFIG_WEAK_ORDERING=y CONFIG_XPS=y CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index 81e0848931..c9c9abcab4 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -228,3 +228,4 @@ CONFIG_TINY_SRCU=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_WATCHDOG_CORE=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/ramips/rt288x/config-4.14 b/target/linux/ramips/rt288x/config-4.14 index de4dffe885..ff358c8b42 100644 --- a/target/linux/ramips/rt288x/config-4.14 +++ b/target/linux/ramips/rt288x/config-4.14 @@ -220,3 +220,4 @@ CONFIG_USB_OHCI_HCD_PLATFORM=m CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_WATCHDOG_CORE=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/ramips/rt305x/config-4.14 b/target/linux/ramips/rt305x/config-4.14 index 346a8a8814..e667e0c947 100644 --- a/target/linux/ramips/rt305x/config-4.14 +++ b/target/linux/ramips/rt305x/config-4.14 @@ -197,3 +197,4 @@ CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_WATCHDOG_CORE=y +CONFIG_MIPS_FPU_EMULATOR=y diff --git a/target/linux/ramips/rt3883/config-4.14 b/target/linux/ramips/rt3883/config-4.14 index 93d803e2ed..08a99c15e8 100644 --- a/target/linux/ramips/rt3883/config-4.14 +++ b/target/linux/ramips/rt3883/config-4.14 @@ -223,3 +223,4 @@ CONFIG_TINY_SRCU=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_WATCHDOG_CORE=y +CONFIG_MIPS_FPU_EMULATOR=y