[openwrt/openwrt] gre: use alternative way to check if kernel support is enabled
LEDE Commits
lede-commits at lists.infradead.org
Sat Mar 13 20:12:50 GMT 2021
dedeckeh pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8a35ebe375d1c27e55dd2cb8c14f25440bc48821
commit 8a35ebe375d1c27e55dd2cb8c14f25440bc48821
Author: Alin Nastac <alin.nastac at gmail.com>
AuthorDate: Tue Feb 23 13:05:09 2021 +0100
gre: use alternative way to check if kernel support is enabled
When necessary support is built in kernel, gre protocol support is
not enabled in netifd.
Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
---
package/network/config/gre/Makefile | 2 +-
package/network/config/gre/files/gre.sh | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile
index b16dd72cde..c920abeb0d 100644
--- a/package/network/config/gre/Makefile
+++ b/package/network/config/gre/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gre
-PKG_RELEASE:=12
+PKG_RELEASE:=13
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh
index eb3df5b48c..b57d5d4cdb 100755
--- a/package/network/config/gre/files/gre.sh
+++ b/package/network/config/gre/files/gre.sh
@@ -291,8 +291,6 @@ proto_grev6tap_init_config() {
}
[ -n "$INCLUDE_ONLY" ] || {
- [ -f /lib/modules/$(uname -r)/gre.ko ] && add_protocol gre
- [ -f /lib/modules/$(uname -r)/gre.ko ] && add_protocol gretap
- [ -f /lib/modules/$(uname -r)/ip6_gre.ko ] && add_protocol grev6
- [ -f /lib/modules/$(uname -r)/ip6_gre.ko ] && add_protocol grev6tap
+ [ -d /sys/module/ip_gre ] && { add_protocol gre; add_protocol gretap; }
+ [ -d /sys/module/ip6_gre ] && { add_protocol grev6; add_protocol grev6tap; }
}
More information about the lede-commits
mailing list