diff options
| author | Felix Fietkau | 2024-01-08 09:21:48 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2024-01-08 09:21:49 +0000 |
| commit | e91ed406ecebb4bc08c346929e25f1b819c19edd (patch) | |
| tree | f7358f56f61505f512b267fa08da8bee33ab80ed | |
| parent | 4094a3cf7fd4d5d1a6863284c525b0801497ef7b (diff) | |
| download | mdnsd-e91ed406ecebb4bc08c346929e25f1b819c19edd.tar.gz | |
ubus: assume that the service iface can be NULL
Fix crash on dump
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | ubus.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -104,7 +104,8 @@ umdns_browse(struct ubus_context *ctx, struct ubus_object *obj, *local = '\0'; c2 = blobmsg_open_table(&b, buffer); strncat(buffer, ".local", MAX_NAME_LEN); - blobmsg_add_string(&b, "iface", s->iface->name); + if (s->iface) + blobmsg_add_string(&b, "iface", s->iface->name); cache_dump_records(&b, s->entry, array, &hostname); if (address) cache_dump_records(&b, hostname, array, NULL); |