mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-09 02:47:08 +01:00
Bug-6452: Set default ExternalPort value to 0 for Device.NAT.PortMapping
This commit is contained in:
parent
cf1780fc70
commit
f1d14059f5
1 changed files with 5 additions and 1 deletions
|
|
@ -548,7 +548,11 @@ static int set_nat_port_mapping_external_port_end_range(char *refparam, struct d
|
|||
if (tmp)
|
||||
*tmp = '\0';
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "%s:%s", src_dport, value);
|
||||
if (!tmp || (src_dport[0] == '\0'))
|
||||
snprintf(buffer, sizeof(buffer), "%s:%s", "0", value);
|
||||
else
|
||||
snprintf(buffer, sizeof(buffer), "%s:%s", src_dport, value);
|
||||
|
||||
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "src_dport", buffer);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue