Fix update

This commit is contained in:
Florian Hoss 2022-07-29 17:32:22 +02:00
parent 8822bc8cc7
commit 8180f90016

View file

@ -58,6 +58,8 @@ namespace fw
firewall_rule_t *Firewall::update_rule_of_firewall(String *args, const uint8_t key)
{
firewall_rule_t *rule_ptr = get_rule_from_firewall(key);
if (rule_ptr == NULL)
return rule_ptr;
strncpy(rule_ptr->ip, args[IP].c_str(), sizeof(rule_ptr->ip));
rule_ptr->port_from = args[PORT_FROM].toInt();
rule_ptr->port_to = args[PORT_TO].toInt();