Ports need more storage in eeprom
This commit is contained in:
parent
56a74f9121
commit
8353443ea4
1 changed files with 4 additions and 4 deletions
|
@ -65,8 +65,8 @@ namespace fw
|
||||||
|
|
||||||
this->memory.begin(rulename, true);
|
this->memory.begin(rulename, true);
|
||||||
strncpy(rule_ptr->ip, this->memory.getString(firewall_fields[IP], "0.0.0.0").c_str(), sizeof(rule_ptr->ip));
|
strncpy(rule_ptr->ip, this->memory.getString(firewall_fields[IP], "0.0.0.0").c_str(), sizeof(rule_ptr->ip));
|
||||||
rule_ptr->port_from = this->memory.getUChar(firewall_fields[PORT_FROM], 0);
|
rule_ptr->port_from = this->memory.getULong(firewall_fields[PORT_FROM], 0);
|
||||||
rule_ptr->port_to = this->memory.getUChar(firewall_fields[PORT_TO], 0);
|
rule_ptr->port_to = this->memory.getULong(firewall_fields[PORT_TO], 0);
|
||||||
rule_ptr->protocol = static_cast<firewall_protocol_t>(this->memory.getUChar(firewall_fields[PROTOCOL], PROTOCOL_ALL));
|
rule_ptr->protocol = static_cast<firewall_protocol_t>(this->memory.getUChar(firewall_fields[PROTOCOL], PROTOCOL_ALL));
|
||||||
rule_ptr->target = static_cast<firewall_target_t>(this->memory.getUChar(firewall_fields[TARGET], TARGET_REJECT));
|
rule_ptr->target = static_cast<firewall_target_t>(this->memory.getUChar(firewall_fields[TARGET], TARGET_REJECT));
|
||||||
this->memory.end();
|
this->memory.end();
|
||||||
|
@ -103,8 +103,8 @@ namespace fw
|
||||||
|
|
||||||
this->memory.begin(rulename, false);
|
this->memory.begin(rulename, false);
|
||||||
this->memory.putString(firewall_fields[IP], rule_ptr->ip);
|
this->memory.putString(firewall_fields[IP], rule_ptr->ip);
|
||||||
this->memory.putUChar(firewall_fields[PORT_FROM], rule_ptr->port_from);
|
this->memory.putULong(firewall_fields[PORT_FROM], rule_ptr->port_from);
|
||||||
this->memory.putUChar(firewall_fields[PORT_TO], rule_ptr->port_to);
|
this->memory.putULong(firewall_fields[PORT_TO], rule_ptr->port_to);
|
||||||
this->memory.putUChar(firewall_fields[PROTOCOL], rule_ptr->protocol);
|
this->memory.putUChar(firewall_fields[PROTOCOL], rule_ptr->protocol);
|
||||||
this->memory.putUChar(firewall_fields[TARGET], rule_ptr->target);
|
this->memory.putUChar(firewall_fields[TARGET], rule_ptr->target);
|
||||||
|
|
||||||
|
|
Reference in a new issue