diff --git a/dmtree/tr181/ethernet.c b/dmtree/tr181/ethernet.c index 67ea7cb4127a6fb84b753741dd6d542834d1abe3..c518a164347543bf20e601cac52c0de27c1fcba5 100644 --- a/dmtree/tr181/ethernet.c +++ b/dmtree/tr181/ethernet.c @@ -354,12 +354,20 @@ int addObjEthernetLink(char *refparam, struct dmctx *ctx, void *data, char **ins int delObjEthernetLink(char *refparam, struct dmctx *ctx, void *data, char *instance, unsigned char del_action) { + char *sect_name= NULL; + struct uci_section *s = NULL; switch (del_action) { case DEL_INST: - dmuci_delete_by_section(((struct dm_args *)data)->section, NULL, NULL); + dmuci_get_value_by_section_string(((struct dm_args *)data)->section, "section_name", §_name); + get_config_section_of_dmmap_section("network", "interface", sect_name, &s); + if(!s) { + dmuci_delete_by_section(((struct dm_args *)data)->section, NULL, NULL); + return 0; + } + return FAULT_9005; break; case DEL_ALL: - DMUCI_DEL_SECTION(bbfdm, DMMAP, "link", NULL, NULL); + return FAULT_9005; break; }