Browse Source

FIXBUG: добавляем ip в nas только когда есть доступ к инету

devel
bashmak 9 years ago
parent
commit
d0377ed419
  1. 2
      agent/commands/dhcp.py

2
agent/commands/dhcp.py

@ -22,6 +22,8 @@ def dhcp_commit(client_ip, client_mac, switch_mac, switch_port):
return
try:
abon = Abon.objects.get(opt82=opt82)
if not abon.is_access():
return
abon.ip_address = client_ip
abon.is_dhcp = True
abon.save(update_fields=['ip_address'])

Loading…
Cancel
Save