Development
This commit is contained in:
parent
386054dc1b
commit
2e40ed9714
1 changed files with 6 additions and 1 deletions
|
|
@ -540,8 +540,13 @@ ARP_MAX_AGE_SECS = 4 * 3600
|
||||||
|
|
||||||
|
|
||||||
def refresh_arp_cache(cfg):
|
def refresh_arp_cache(cfg):
|
||||||
|
try:
|
||||||
|
with open(CONFIG_FILE) as f:
|
||||||
|
full_cfg = json.load(f)
|
||||||
|
except Exception:
|
||||||
|
full_cfg = {}
|
||||||
vlan_networks = []
|
vlan_networks = []
|
||||||
for v in cfg.get('vlans', []):
|
for v in full_cfg.get('vlans', []):
|
||||||
subnet = v.get('subnet')
|
subnet = v.get('subnet')
|
||||||
mask = v.get('subnet_mask')
|
mask = v.get('subnet_mask')
|
||||||
if subnet and mask:
|
if subnet and mask:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue