mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-09 13:22:53 +01:00
Ticket refs #6911: Failed to re-create Bridge
This commit is contained in:
parent
093208bf32
commit
54937be474
2 changed files with 14 additions and 4 deletions
|
|
@ -156,6 +156,11 @@ int browseInterfaceStackInst(struct dmctx *dmctx, DMNODE *parent_node, void *pre
|
|||
char *value = NULL;
|
||||
int found = 0;
|
||||
char *device = get_device(section_name(s));
|
||||
|
||||
/* If the device value is empty, then get its value directly from device option */
|
||||
if (*device == '\0')
|
||||
dmuci_get_value_by_section_string(s, "device", &device);
|
||||
|
||||
if (device[0] != '\0') {
|
||||
struct uci_section *vlan_sect = NULL;
|
||||
adm_entry_get_linker_param(dmctx, "Device.Ethernet.VLANTermination.", device, &value);
|
||||
|
|
@ -219,6 +224,11 @@ int browseInterfaceStackInst(struct dmctx *dmctx, DMNODE *parent_node, void *pre
|
|||
int found = 0;
|
||||
// The lower layer is Device.Ethernet.VLANTermination.{i}.
|
||||
char *ppp_device = get_device(section_name(s));
|
||||
|
||||
/* If the device value is empty, then get its value directly from device option */
|
||||
if (*ppp_device == '\0')
|
||||
dmuci_get_value_by_section_string(s, "device", &ppp_device);
|
||||
|
||||
if (ppp_device[0] != '\0') {
|
||||
struct uci_section *vlan_sect = NULL;
|
||||
adm_entry_get_linker_param(dmctx, "Device.Ethernet.VLANTermination.", ppp_device, &value);
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@ static int addObjIPInterface(char *refparam, struct dmctx *ctx, void *data, char
|
|||
struct uci_section *dmmap_ip_interface;
|
||||
char ip_name[32] = {0};
|
||||
|
||||
snprintf(ip_name, sizeof(ip_name), "ip_interface_%s", *instance);
|
||||
snprintf(ip_name, sizeof(ip_name), "iface%s", *instance);
|
||||
|
||||
dmuci_set_value("network", ip_name, "", "interface");
|
||||
dmuci_set_value("network", ip_name, "proto", "none");
|
||||
|
|
@ -812,7 +812,7 @@ static int addObjIPInterfaceIPv4Address(char *refparam, struct dmctx *ctx, void
|
|||
if (!strcmp(*instance, "1")) {
|
||||
char device_buf[32] = {0};
|
||||
|
||||
snprintf(ipv4_name, sizeof(ipv4_name), "ip_interface_%s_ipv4_%s", ip_inst, *instance);
|
||||
snprintf(ipv4_name, sizeof(ipv4_name), "iface%s_ipv4_%s", ip_inst, *instance);
|
||||
snprintf(device_buf, sizeof(device_buf), "@%s", section_name((struct uci_section *)data));
|
||||
|
||||
dmuci_set_value("network", ipv4_name, "", "interface");
|
||||
|
|
@ -893,7 +893,7 @@ static int addObjIPInterfaceIPv6Address(char *refparam, struct dmctx *ctx, void
|
|||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name((struct uci_section *)data), &dmmap_ip_interface);
|
||||
dmuci_get_value_by_section_string(dmmap_ip_interface, "ip_int_instance", &ip_inst);
|
||||
|
||||
snprintf(ipv6_name, sizeof(ipv6_name), "ip_interface_%s_ipv6_%s", ip_inst, *instance);
|
||||
snprintf(ipv6_name, sizeof(ipv6_name), "iface%s_ipv6_%s", ip_inst, *instance);
|
||||
snprintf(device_buf, sizeof(device_buf), "@%s", section_name((struct uci_section *)data));
|
||||
|
||||
dmuci_set_value("network", ipv6_name, "", "interface");
|
||||
|
|
@ -922,7 +922,7 @@ static int addObjIPInterfaceIPv6Prefix(char *refparam, struct dmctx *ctx, void *
|
|||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name((struct uci_section *)data), &dmmap_ip_interface);
|
||||
dmuci_get_value_by_section_string(dmmap_ip_interface, "ip_int_instance", &ip_inst);
|
||||
|
||||
snprintf(ipv6_prefix_name, sizeof(ipv6_prefix_name), "ip_interface_%s_ipv6_prefix_%s", ip_inst, *instance);
|
||||
snprintf(ipv6_prefix_name, sizeof(ipv6_prefix_name), "iface%s_ipv6_prefix_%s", ip_inst, *instance);
|
||||
snprintf(device_buf, sizeof(device_buf), "@%s", section_name((struct uci_section *)data));
|
||||
|
||||
dmuci_set_value("network", ipv6_prefix_name, "", "interface");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue