interface: fix ifname present check in interface status
authorFelix Fietkau <nbd@nbd.name>
Fri, 8 Apr 2022 10:54:49 +0000 (12:54 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 8 Apr 2022 10:54:49 +0000 (12:54 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
interface.c

index 7979b21d71b822bf302e987169636938556da010..e51db3fd1a0cb4f430bdff9189bd031fc076d176 100644 (file)
@@ -549,7 +549,7 @@ __qosify_iface_status(struct blob_buf *b, struct qosify_iface *iface)
 
        c = blobmsg_open_table(b, qosify_iface_name(iface));
        blobmsg_add_u8(b, "active", iface->active);
-       if (iface->ifname)
+       if (iface->ifname[0])
                blobmsg_add_string(b, "ifname", iface->ifname);
        blobmsg_add_u8(b, "egress", iface->config.egress);
        blobmsg_add_u8(b, "ingress", iface->config.ingress);