mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Fix bridge port LowerLayer empty
This commit is contained in:
parent
72f09c8264
commit
8dbbaa8f3c
1 changed files with 11 additions and 3 deletions
|
|
@ -2029,8 +2029,13 @@ static int get_BridgingBridgePort_LowerLayers(char *refparam, struct dmctx *ctx,
|
|||
dmuci_get_value_by_section_string(args->bridge_port_dmmap_sec, "config", &config);
|
||||
|
||||
if (DM_LSTRCMP(config, "network") == 0) {
|
||||
char *tag = DM_STRCHR(port, '.');
|
||||
if (tag) tag[0] = '\0';
|
||||
adm_entry_get_linker_param(ctx, "Device.Ethernet.Interface.", port, value);
|
||||
if (!(*value) || (*value)[0] == 0) {
|
||||
char *tag = DM_STRCHR(port, '.');
|
||||
if (tag) tag[0] = '\0';
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
adm_entry_get_linker_param(ctx, "Device.Ethernet.Interface.", port, value);
|
||||
|
|
@ -2081,6 +2086,10 @@ static int set_BridgingBridgePort_LowerLayers(char *refparam, struct dmctx *ctx,
|
|||
return 0;
|
||||
}
|
||||
|
||||
dmuci_get_value_by_section_string(args->bridge_port_dmmap_sec, "port", &port_device);
|
||||
if (DM_STRCMP(linker, port_device) == 0) // Same as already configured
|
||||
return 0;
|
||||
|
||||
// Update config section on dmmap_bridge_port if the linker is wirelss port or network port
|
||||
if (DM_LSTRNCMP(value, "Device.WiFi.SSID.", 17) == 0) {
|
||||
dmuci_set_value_by_section(args->bridge_port_dmmap_sec, "config", "wireless");
|
||||
|
|
@ -2096,7 +2105,6 @@ static int set_BridgingBridgePort_LowerLayers(char *refparam, struct dmctx *ctx,
|
|||
}
|
||||
|
||||
dmuci_get_value_by_section_string(args->bridge_port_dmmap_sec, "enabled", &port_enabled);
|
||||
dmuci_get_value_by_section_string(args->bridge_port_dmmap_sec, "port", &port_device);
|
||||
if (port_device[0] == '\0') {
|
||||
|
||||
if (DM_STRCMP(port_enabled, "1") == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue