Fix esp32

This commit is contained in:
Florian Hoss 2022-06-12 14:21:06 +02:00
parent f757b06235
commit 2e474d8e2a
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ namespace fw
sprintf(rulename, "fwRule%i", key);
this->memory.begin(rulename, true);
strncpy(rule_ptr->source, this->memory.getString(firewall_fields[IP], "0.0.0.0").c_str(), sizeof(rule_ptr->source));
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_to = this->memory.getUChar(firewall_fields[PORT_TO], 0);
rule_ptr->protocol = static_cast<firewall_protocol_t>(this->memory.getUChar(firewall_fields[PROTOCOL], PROTOCOL_ALL));