diff --git a/dm/dmtree/tr181/dhcp.c b/dm/dmtree/tr181/dhcp.c index 0d49896..5f6250a 100644 --- a/dm/dmtree/tr181/dhcp.c +++ b/dm/dmtree/tr181/dhcp.c @@ -2567,6 +2567,8 @@ int set_DHCPv4RelayForwarding_Interface(char *refparam, struct dmctx *ctx, void adm_entry_get_linker_value(ctx, newvalue, &linker); } else adm_entry_get_linker_value(ctx, value, &linker); + if(linker == NULL) + return FAULT_9007; uci_path_foreach_sections(icwmpd, "dmmap_dhcp_relay", "interface", s) { dmuci_get_value_by_section_string(s, "section_name", &v); if(strcmp(v, linker) == 0) diff --git a/dm/dmtree/tr181/ip.c b/dm/dmtree/tr181/ip.c index d76b3cb..828365b 100644 --- a/dm/dmtree/tr181/ip.c +++ b/dm/dmtree/tr181/ip.c @@ -3219,7 +3219,7 @@ int browseIPIfaceInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, } dmuci_get_value_by_section_string(p->config_section, "proto", &proto); dmuci_get_value_by_section_string(p->config_section, "ip_int_instance", &inst); - if (ipv4addr[0] == '\0' && ipv6addr[0] == '\0' && strcmp(proto, "dhcp") != 0 && strcmp(proto, "dhcpv6") != 0 && strcmp(inst, "") == 0 && strcmp(type, "bridge") != 0) { + if (ipv4addr[0] == '\0' && ipv6addr[0] == '\0' && strcmp(proto, "dhcp") != 0 && strcmp(proto, "dhcpv6") != 0 && strcmp(proto, "relay") != 0 && strcmp(inst, "") == 0 && strcmp(type, "bridge") != 0) { continue; } init_ip_args(&curr_ip_args, p->config_section, ipv4addr, ipv6addr);