[openwrt/openwrt] xfrm: remove requirement for underlying device

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 19 09:49:52 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/60951f0515e0301619de6757de5e6b76dad645c4

commit 60951f0515e0301619de6757de5e6b76dad645c4
Author: Matt Eaton <git at divinehawk.com>
AuthorDate: Thu Aug 1 11:57:54 2024 -0400

    xfrm: remove requirement for underlying device
    
    Since kernel 5.3, phydev (dev) is no longer required
    
       torvalds/linux at 22d6552
    
    Signed-off-by: Matt Eaton <git at divinehawk.com>
    Link: https://github.com/openwrt/openwrt/pull/16046
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/network/config/xfrm/Makefile      |  2 +-
 package/network/config/xfrm/files/xfrm.sh | 13 ++++---------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/package/network/config/xfrm/Makefile b/package/network/config/xfrm/Makefile
index 777f20c77c..68f81df65b 100644
--- a/package/network/config/xfrm/Makefile
+++ b/package/network/config/xfrm/Makefile
@@ -2,7 +2,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xfrm
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/xfrm/files/xfrm.sh b/package/network/config/xfrm/files/xfrm.sh
index bdebd4b9c3..5fa33bffb0 100755
--- a/package/network/config/xfrm/files/xfrm.sh
+++ b/package/network/config/xfrm/files/xfrm.sh
@@ -14,27 +14,22 @@ proto_xfrm_setup() {
 	local tunlink ifid mtu zone multicast
 	json_get_vars tunlink ifid mtu zone multicast
 
-	[ -z "$tunlink" ] && {
-		proto_notify_error "$cfg" NO_TUNLINK
-		proto_block_restart "$cfg"
-		exit
-	}
-
 	[ -z "$ifid" ] && {
 		proto_notify_error "$cfg" NO_IFID
 		proto_block_restart "$cfg"
 		exit
 	}
 
-	( proto_add_host_dependency "$cfg" '' "$tunlink" )
-
 	proto_init_update "$cfg" 1
 
 	proto_add_tunnel
 	json_add_string mode "$mode"
 	json_add_int mtu "${mtu:-1280}"
 
-	json_add_string link "$tunlink"
+	[ -n "$tunlink" ] && {
+		( proto_add_host_dependency "$cfg" '' "$tunlink" )
+		json_add_string link "$tunlink"
+	}
 
 	json_add_boolean multicast "${multicast:-1}"
 




More information about the lede-commits mailing list