X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=ubus.c;h=aeb864fdabd24610c2f5a8c18351147c1fc1b69d;hp=63b26d679b4378f794c7654e7597d896920eb706;hb=2b3e96c491d6929a518ac2216d93c3dbcfa9bb1a;hpb=559df99f259e88edaa7e45826a0ff436f2a07d1a diff --git a/ubus.c b/ubus.c index 63b26d6..aeb864f 100644 --- a/ubus.c +++ b/ubus.c @@ -650,7 +650,8 @@ netifd_dump_status(struct interface *iface) if (iface->state == IFS_UP) { time_t cur = system_get_rtime(); blobmsg_add_u32(&b, "uptime", cur - iface->start_time); - blobmsg_add_string(&b, "l3_device", iface->l3_dev.dev->ifname); + if (iface->l3_dev.dev) + blobmsg_add_string(&b, "l3_device", iface->l3_dev.dev->ifname); } if (iface->proto_handler) @@ -741,7 +742,7 @@ netifd_dump_status(struct interface *iface) blobmsg_close_table(&b, a); - if (!list_is_empty(&iface->errors)) + if (!list_empty(&iface->errors)) netifd_add_interface_errors(&b, iface); }