From 16a8466c8d133e02b2bc322318cda2d51d670125 Mon Sep 17 00:00:00 2001 From: Amin Ben Romdhane Date: Fri, 27 Oct 2023 16:01:15 +0200 Subject: [PATCH] Hosts: use 'device' instead of 'parent_device' when looking for 'Layer1Interface' parameter --- libbbfdm/dmtree/tr181/hosts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbbfdm/dmtree/tr181/hosts.c b/libbbfdm/dmtree/tr181/hosts.c index aa20a5e8..6c736a13 100644 --- a/libbbfdm/dmtree/tr181/hosts.c +++ b/libbbfdm/dmtree/tr181/hosts.c @@ -289,7 +289,7 @@ static int get_HostsHost_Layer1Interface(char *refparam, struct dmctx *ctx, void adm_entry_get_linker_param(ctx, "Device.WiFi.Radio.", linker, value); if (!(*value) || (*value)[0] == 0) { char *device = dmjson_get_value((json_object *)data, 1, "parent_device"); - struct uci_section *iface_s = get_dup_section_in_config_opt("wireless", "wifi-iface", "ifname", device); + struct uci_section *iface_s = get_dup_section_in_config_opt("wireless", "wifi-iface", "ifname", DM_STRLEN(device) ? device : linker); dmuci_get_value_by_section_string(iface_s, "device", &linker); adm_entry_get_linker_param(ctx, "Device.WiFi.Radio.", linker, value); }