From 2e474d8e2a0499a43a37f5118717933076637c0a Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Sun, 12 Jun 2022 14:21:06 +0200 Subject: [PATCH] Fix esp32 --- ESPFirewall/lib/Firewall/src/Storage.cpp | 2 +- ESPFirewall/lib/Firewall/src/Storage.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();