Fix update
This commit is contained in:
parent
8822bc8cc7
commit
8180f90016
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
|
|
Reference in a new issue