mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-02 23:53:49 +01:00
Revert "Firewall: set SourceAllInterfaces and DestAllInterfaces => do nothing if the current value is equal to the settable value"
This reverts commit ccecc9cd28.
This commit is contained in:
parent
ccecc9cd28
commit
7a7c01fec7
1 changed files with 8 additions and 16 deletions
|
|
@ -959,16 +959,12 @@ static int set_rule_source_all_interfaces(char *refparam, struct dmctx *ctx, voi
|
|||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
string_to_bool(value, &b);
|
||||
|
||||
// Get the current 'src' option
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "src", &src);
|
||||
|
||||
if ((b && strcmp(src, "*") == 0) || (!b && strcmp(src, "*") != 0))
|
||||
break;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_firewall", "rule", section_name((struct uci_section *)data), &dmmap_section);
|
||||
string_to_bool(value, &b);
|
||||
if (b) {
|
||||
// Get the current 'src' option
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "src", &src);
|
||||
|
||||
// Save 'src' option in the associated dmmap rule section
|
||||
dmuci_set_value_by_section(dmmap_section, "src", src);
|
||||
|
||||
|
|
@ -1032,16 +1028,12 @@ static int set_rule_dest_all_interfaces(char *refparam, struct dmctx *ctx, void
|
|||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
string_to_bool(value, &b);
|
||||
|
||||
// Get the current 'dest' option
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "dest", &dest);
|
||||
|
||||
if ((b && strcmp(dest, "*") == 0) || (!b && strcmp(dest, "*") != 0))
|
||||
break;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_firewall", "rule", section_name((struct uci_section *)data), &dmmap_section);
|
||||
string_to_bool(value, &b);
|
||||
if (b) {
|
||||
// Get the current 'dest' option
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "dest", &dest);
|
||||
|
||||
// Save 'dest' option in the associated dmmap rule section
|
||||
dmuci_set_value_by_section(dmmap_section, "dest", dest);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue