Fix: TR181 - extra instances of Bridge.{i}.Port.{i}. are created when creating Bridge.{i}.VLANPort.{i}.

This commit is contained in:
Arun Muthusamy 2021-11-11 12:07:04 +01:00 committed by Amin Ben Ramdhane
parent 1b4c5f9d1e
commit 8c7ad48ba5

View file

@ -2773,7 +2773,12 @@ static int set_BridgingBridgeVLANPort_VLAN(char *refparam, struct dmctx *ctx, vo
}
}
/* Update the name dmmap section */
/* Update ports list in dmmap_bridge */
get_dmmap_section_of_config_section("dmmap_bridge", "device", section_name(((struct bridge_vlanport_args *)data)->bridge_sec), &s);
remove_port_from_bridge_section(s, curr_ifname);
add_port_to_bridge_section(s, new_name);
/* Update the name dmmap section */
dmuci_set_value_by_section(((struct bridge_vlanport_args *)data)->bridge_vlanport_dmmap_sec, "name", new_name);
} else {
// the current ifname is empty in device section