xfrm: remove requirement for underlying device
authorMatt Eaton <git@divinehawk.com>
Thu, 1 Aug 2024 15:57:54 +0000 (11:57 -0400)
committerRobert Marko <robimarko@gmail.com>
Mon, 19 Aug 2024 16:49:49 +0000 (18:49 +0200)
Since kernel 5.3, phydev (dev) is no longer required

   torvalds/linux@22d6552

Signed-off-by: Matt Eaton <git@divinehawk.com>
Link: https://github.com/openwrt/openwrt/pull/16046
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/config/xfrm/Makefile
package/network/config/xfrm/files/xfrm.sh

index 777f20c77ce6fd7eacd239393dc9237ac69bd390..68f81df65b548ed39c325a8712f2b50c6dc9f71c 100644 (file)
@@ -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
index bdebd4b9c3663c051da997cd3125879df3e44177..5fa33bffb0c7786e2704686f482af87c5a9eba7b 100755 (executable)
@@ -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}"