diff options
author | Alin Nastac <alin.nastac@gmail.com> | 2021-02-23 13:05:09 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2021-03-13 20:58:55 +0100 |
commit | 8a35ebe375d1c27e55dd2cb8c14f25440bc48821 (patch) | |
tree | a8a2baf5ddd4282857af28d5362554d5fdc88a42 /package/network/config/gre/files | |
parent | 1cd098784eeb0e3ba0d05cd3e71ebf1a106138e9 (diff) | |
download | upstream-8a35ebe375d1c27e55dd2cb8c14f25440bc48821.tar.gz upstream-8a35ebe375d1c27e55dd2cb8c14f25440bc48821.tar.bz2 upstream-8a35ebe375d1c27e55dd2cb8c14f25440bc48821.zip |
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@gmail.com>
Diffstat (limited to 'package/network/config/gre/files')
-rwxr-xr-x | package/network/config/gre/files/gre.sh | 6 |
1 files changed, 2 insertions, 4 deletions
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; } } |