gluon/patches/packages/packages/0006-fastd-fix-start-of-non-L2TP-variant.patch
2022-02-23 21:50:15 +01:00

64 lines
2.3 KiB
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 27 Jun 2021 14:48:48 +0200
Subject: fastd: fix start of non-L2TP variant
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit 62742985d7cf15029b4d6027a7ccfa0e480278ca)
diff --git a/net/fastd/Makefile b/net/fastd/Makefile
index 58255cb0ba1a3b00fbca7cfdd44abd3a923603f3..6fd316374d876834995f696fc63e7fbb98fb437c 100644
--- a/net/fastd/Makefile
+++ b/net/fastd/Makefile
@@ -9,6 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=fastd
PKG_VERSION:=22
+PKG_RELEASE=2
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
diff --git a/net/fastd/patches/0001-config-allow-disabling-L2TP-offload-when-fastd-doesn.patch b/net/fastd/patches/0001-config-allow-disabling-L2TP-offload-when-fastd-doesn.patch
new file mode 100644
index 0000000000000000000000000000000000000000..f2eabc95d61abf070907239b9d5d5935bd82966c
--- /dev/null
+++ b/net/fastd/patches/0001-config-allow-disabling-L2TP-offload-when-fastd-doesn.patch
@@ -0,0 +1,38 @@
+From d95ae843845760aecbbc62a734c2b93b401b1834 Mon Sep 17 00:00:00 2001
+Message-Id: <d95ae843845760aecbbc62a734c2b93b401b1834.1624798048.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Sun, 27 Jun 2021 14:45:46 +0200
+Subject: [PATCH] config: allow disabling L2TP offload when fastd doesn't
+ support it
+
+Only attempting to enable the offloading should raise an error when it
+is not supported.
+---
+ src/config.y | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/config.y b/src/config.y
+index a107d7b9fda7..7a3ec6a32649 100644
+--- a/src/config.y
++++ b/src/config.y
+@@ -282,12 +282,14 @@ offload: TOK_L2TP boolean {
+ #ifdef WITH_OFFLOAD_L2TP
+ conf.offload_l2tp = $2;
+ #else
++ if ($2) {
+ # ifdef __linux__
+- fastd_config_error(&@$, state, "L2TP offload is not supported by this build of fastd");
++ fastd_config_error(&@$, state, "L2TP offload is not supported by this build of fastd");
+ # else
+- fastd_config_error(&@$, state, "L2TP offload is not supported on this platform");
++ fastd_config_error(&@$, state, "L2TP offload is not supported on this platform");
+ # endif
+- YYERROR;
++ YYERROR;
++ }
+ #endif
+ }
+ ;
+--
+2.32.0
+