mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-02 21:44:31 +02:00
crosscheck NAT .id in case of mikrotik reboot
This commit is contained in:
parent
ce98668f1e
commit
8f8817a1f7
3 changed files with 20 additions and 3 deletions
|
@ -347,7 +347,8 @@ class MikrotikControllerData():
|
|||
if uid not in self.data['nat']:
|
||||
self.data['nat'][uid] = {}
|
||||
|
||||
self.data['nat'][uid]['name'] = entry['protocol'] + ':' + str(entry['dst-port'])
|
||||
self.data['nat'][uid]['name'] = "{}:{}".format(entry['protocol'], entry['dst-port'])
|
||||
self.data['nat'][uid]['.id'] = from_entry(entry, '.id')
|
||||
self.data['nat'][uid]['protocol'] = from_entry(entry, 'protocol')
|
||||
self.data['nat'][uid]['dst-port'] = from_entry(entry, 'dst-port')
|
||||
self.data['nat'][uid]['in-interface'] = from_entry(entry, 'in-interface', 'any')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue