diff --git a/ESPFirewall/lib/Firewall/src/Storage.cpp b/ESPFirewall/lib/Firewall/src/Storage.cpp index 48a8b28..b2f366f 100644 --- a/ESPFirewall/lib/Firewall/src/Storage.cpp +++ b/ESPFirewall/lib/Firewall/src/Storage.cpp @@ -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(this->memory.getUChar(firewall_fields[PROTOCOL], PROTOCOL_ALL)); diff --git a/ESPFirewall/lib/Firewall/src/Storage.hpp b/ESPFirewall/lib/Firewall/src/Storage.hpp index 26ab44b..ec69548 100644 --- a/ESPFirewall/lib/Firewall/src/Storage.hpp +++ b/ESPFirewall/lib/Firewall/src/Storage.hpp @@ -26,8 +26,8 @@ namespace fw uint16_t eeprom_amount_of_rules; uint16_t eeprom_rules_head; - uint16_t eeprom_rule_position(uint8_t key); #endif + uint16_t eeprom_rule_position(uint8_t key); protected: uint8_t retrieve_amount_of_rules();