basic function to check client
This commit is contained in:
parent
dfb92d6bf9
commit
8e29479aea
3 changed files with 19 additions and 3 deletions
|
@ -118,4 +118,16 @@ namespace fw
|
|||
Storage::store_all_firewall_rules(rule_head);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
bool Firewall::is_client_allowed(WiFiClient client)
|
||||
{
|
||||
const char *ip = client.remoteIP().toString().c_str();
|
||||
const uint16_t port = client.remotePort();
|
||||
|
||||
Serial.print("Client connected: ");
|
||||
Serial.print(client.remoteIP());
|
||||
Serial.print(":");
|
||||
Serial.println(client.remotePort());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue