diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-04-19 11:58:16 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-04-19 11:58:16 +0200 |
commit | ede9739fe90f5da09f14481d10a4f11c000072de (patch) | |
tree | 8824192949371b8974a448d2e3b9d1c5b9cb4cb9 /ubus.c | |
parent | f06565ce63414c9a1ce558a5ea35f2b6a4ed1605 (diff) |
ubus: check the l3_dev pointer before dereferencing it
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |