unetd: fix interface teardown
authorFelix Fietkau <nbd@nbd.name>
Sun, 26 Jan 2025 20:10:53 +0000 (21:10 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sun, 26 Jan 2025 20:19:37 +0000 (21:19 +0100)
Pass the correct device name in the network_del ubus call

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/unetd/files/unetd.sh

index 2f0f0c478c78a94292024c1c83340e0f179f9806..2117eab391a198fab254c3fee13c769f6ec50e34 100644 (file)
@@ -82,11 +82,10 @@ proto_unet_setup() {
 
 proto_unet_teardown() {
        local config="$1"
-       local iface="$2"
 
        local device
        json_get_vars device
-       device="${device:-$iface}"
+       device="${device:-$config}"
 
        json_init
        json_add_string name "$device"