[openwrt/openwrt] netifd: relax check in dhcp proto handler

LEDE Commits lede-commits at lists.infradead.org
Wed Apr 13 12:27:53 PDT 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c5f113c43f43c20555298c8500bf91bffbe1f58b

commit c5f113c43f43c20555298c8500bf91bffbe1f58b
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Apr 13 16:51:58 2022 +0100

    netifd: relax check in dhcp proto handler
    
    Checking whether /sbin/udhcpc is a symbolic link breaks using the
    DHCP proto handler inside procd-ujail where bind-mounts are used for
    the resolved link. Check whether /sbin/udhcpc is executable instead
    to allow using the proto handler for DHCP-provisioned containers.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 3034b2ba68..ea6d872eb4 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-[ -L /sbin/udhcpc ] || exit 0
+[ -x /sbin/udhcpc ] || exit 0
 
 . /lib/functions.sh
 . ../netifd-proto.sh




More information about the lede-commits mailing list