Fix the command to execute in static_up6 when
ENABLE_FEATURE_IFUPDOWN_IP is defined.  Include the optional "[[
metric %metric%]]" inside the optional "[[ip route add ... ]]".

Signed-off-by: Ignacy Gawędzki <[email protected]>
---
 networking/ifupdown.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 9c3640be7..7037dd8d8 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -487,7 +487,7 @@ static int FAST_FUNC static_up6(struct interface_defn_t 
*ifd, execfn *exec)
        result = execute("ip addr add %address%/%netmask% dev %iface%[[ label 
%label%]]", ifd, exec);
        result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] 
%iface% up", ifd, exec);
        /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-       result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ 
metric %metric%]]", ifd, exec);
+       result += execute("[[ip route add ::/0 via %gateway% dev %iface%[[ 
metric %metric%]]]]", ifd, exec);
 # else
        result = execute("ifconfig %iface%[[ media %media%]][[ hw 
%hwaddress%]][[ mtu %mtu%]] up", ifd, exec);
        result += execute("ifconfig %iface% add %address%/%netmask%", ifd, 
exec);
-- 
2.48.1
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to