mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Ticket refs #5710: Adapt Provider Bridge Object to OpenWrt 21.02 network stack
This commit is contained in:
parent
06bebcef6b
commit
ed22bfbe0f
7 changed files with 884 additions and 115 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -217,10 +217,6 @@ static int dmmap_synchronizeEthernetLink(struct dmctx *dmctx, DMNODE *parent_nod
|
|||
if (strchr(device, '@'))
|
||||
continue;
|
||||
|
||||
// If the section belong to provider bridge (section name: pr_br_{i}) then skip adding to dmmap_package
|
||||
if (strncmp(section_name(s), "pr_br_", 6) == 0)
|
||||
continue;
|
||||
|
||||
dmuci_get_value_by_section_string(s, "macaddr", &macaddr);
|
||||
create_link(section_name(s), macaddr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ static int browseGRETunnelInterfaceInst(struct dmctx *dmctx, DMNODE *parent_node
|
|||
if ((s = has_tunnel_interface_route(section_name(p->config_section))) == NULL)
|
||||
continue;
|
||||
|
||||
p->additional_attribute = dm->config_section;
|
||||
|
||||
browse_args.option = "section_name";
|
||||
browse_args.value = section_name(dm->config_section);
|
||||
|
||||
|
|
|
|||
|
|
@ -136,10 +136,6 @@ int browseInterfaceStackInst(struct dmctx *dmctx, DMNODE *parent_node, void *pre
|
|||
strchr(device, '@'))
|
||||
continue;
|
||||
|
||||
// Skip if its a provider bridge configuration
|
||||
if (strncmp(section_name(s), "pr_br_", 6) == 0)
|
||||
continue;
|
||||
|
||||
// The higher layer is Device.IP.Interface.{i}.
|
||||
layer_inst = get_instance_by_section(dmctx->instance_mode, "dmmap_network", "interface", "section_name", section_name(s), "ip_int_instance", "ip_int_alias");
|
||||
if (*layer_inst == '\0')
|
||||
|
|
|
|||
12
dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c
vendored
12
dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c
vendored
|
|
@ -56,7 +56,7 @@ static void sync_mcast_dmmap_iface_sec(struct uci_list *proxy_iface, char *s_mod
|
|||
uci_path_foreach_option_eq(bbfdm, dmmap_package, dmmap_sec, "ifname", key, d_sec) {
|
||||
dmuci_get_value_by_section_string(d_sec, "section_name", &s_name);
|
||||
if (strcmp(s_name, section_name(s)) == 0) {
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ static void sync_mcast_dmmap_iface_sec(struct uci_list *proxy_iface, char *s_mod
|
|||
dmuci_set_value_by_section_bbfdm(d_sec, "ifname", key);
|
||||
dmuci_set_value_by_section_bbfdm(d_sec, "upstream", up_iface);
|
||||
dmuci_set_value_by_section_bbfdm(d_sec, "snooping_mode", s_mode);
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ static void add_empty_mcast_iface_to_list(char *dmmap_package, char *dmmap_sec,
|
|||
dmuci_get_value_by_section_string(dmmap_sect, "ifname", &f_ifname);
|
||||
|
||||
if (f_ifname && *f_ifname == '\0')
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ void synchronize_specific_config_sections_with_dmmap_mcast_filter(char *package,
|
|||
uci_path_foreach_option_eq(bbfdm, dmmap_package, dmmap_sec, "ipaddr", ip_addr, d_sec) {
|
||||
dmuci_get_value_by_section_string(d_sec, "section_name", &s_name);
|
||||
if (strcmp(s_name, section_name(s)) == 0) {
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ void synchronize_specific_config_sections_with_dmmap_mcast_filter(char *package,
|
|||
dmuci_set_value_by_section_bbfdm(d_sec, "section_name", section_name(s));
|
||||
dmuci_set_value_by_section_bbfdm(d_sec, "ipaddr", ip_addr);
|
||||
dmuci_set_value_by_section_bbfdm(d_sec, "enable", "1");
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, d_sec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ void synchronize_specific_config_sections_with_dmmap_mcast_filter(char *package,
|
|||
dmuci_get_value_by_section_string(dmmap_sect, "enable", &f_enable);
|
||||
|
||||
if ((f_ip[0] == '\0') || (strcmp(f_enable, "0") == 0))
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ void hex_to_ip(char *address, char *ret)
|
|||
/*
|
||||
* dmmap_config sections list manipulation
|
||||
*/
|
||||
void add_dmmap_config_dup_list(struct list_head *dup_list, struct uci_section *config_section, struct uci_section *dmmap_section, void *additional_attribute)
|
||||
void add_dmmap_config_dup_list(struct list_head *dup_list, struct uci_section *config_section, struct uci_section *dmmap_section)
|
||||
{
|
||||
struct dmmap_dup *dmmap_config;
|
||||
|
||||
|
|
@ -282,7 +282,6 @@ void add_dmmap_config_dup_list(struct list_head *dup_list, struct uci_section *c
|
|||
list_add_tail(&dmmap_config->list, dup_list);
|
||||
dmmap_config->config_section = config_section;
|
||||
dmmap_config->dmmap_section = dmmap_section;
|
||||
dmmap_config->additional_attribute = additional_attribute;
|
||||
}
|
||||
|
||||
static void dmmap_config_dup_delete(struct dmmap_dup *dmmap_config)
|
||||
|
|
@ -355,14 +354,6 @@ void synchronize_specific_config_sections_with_dmmap(char *package, char *sectio
|
|||
char *v;
|
||||
|
||||
uci_foreach_sections(package, section_type, s) {
|
||||
/*
|
||||
* create/update corresponding dmmap section that have same config_section link and using param_value_array
|
||||
* If the section belong to provider bridge (section name: pr_br_{i}) then skip adding to dmmap_package
|
||||
*/
|
||||
if ((strcmp(package, "network") == 0) &&
|
||||
(strncmp(section_name(s), "pr_br_", 6) == 0))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* create/update corresponding dmmap section that have same config_section link and using param_value_array
|
||||
*/
|
||||
|
|
@ -374,7 +365,7 @@ void synchronize_specific_config_sections_with_dmmap(char *package, char *sectio
|
|||
/*
|
||||
* Add system and dmmap sections to the list
|
||||
*/
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -404,7 +395,7 @@ void synchronize_specific_config_sections_with_dmmap_eq(char *package, char *sec
|
|||
/*
|
||||
* Add system and dmmap sections to the list
|
||||
*/
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, s, dmmap_sect);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -434,7 +425,7 @@ void synchronize_specific_config_sections_with_dmmap_cont(char *package, char *s
|
|||
/*
|
||||
* Add system and dmmap sections to the list
|
||||
*/
|
||||
add_dmmap_config_dup_list(dup_list, uci_s, dmmap_sect, NULL);
|
||||
add_dmmap_config_dup_list(dup_list, uci_s, dmmap_sect);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -199,7 +199,6 @@ struct dmmap_dup
|
|||
struct list_head list;
|
||||
struct uci_section *config_section;
|
||||
struct uci_section *dmmap_section;
|
||||
void* additional_attribute;
|
||||
};
|
||||
|
||||
struct dmmap_sect {
|
||||
|
|
@ -229,7 +228,7 @@ int dmcmd(char *cmd, int n, ...);
|
|||
int dmcmd_no_wait(char *cmd, int n, ...);
|
||||
void update_section_list(char *config, char *section, char *option, int number, char *filter, char *option1, char *val1, char *option2, char *val2);
|
||||
void hex_to_ip(char *address, char *ret);
|
||||
void add_dmmap_config_dup_list(struct list_head *dup_list, struct uci_section *config_section, struct uci_section *dmmap_section, void* additional_attribute);
|
||||
void add_dmmap_config_dup_list(struct list_head *dup_list, struct uci_section *config_section, struct uci_section *dmmap_section);
|
||||
void free_dmmap_config_dup_list(struct list_head *dup_list);
|
||||
void synchronize_specific_config_sections_with_dmmap(char *package, char *section_type, char *dmmap_package, struct list_head *dup_list);
|
||||
void synchronize_specific_config_sections_with_dmmap_eq(char *package, char *section_type, char *dmmap_package,char* option_name, char* option_value, struct list_head *dup_list);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue