Skip to content

Commit

Permalink
Merge pull request #2193 from sever-sever/T5536
Browse files Browse the repository at this point in the history
T5536: Fix show dhcp client leases
  • Loading branch information
c-po authored Sep 1, 2023
2 parents b92515d + 99837ad commit d3da152
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/op_mode/dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,12 @@ def _get_formatted_client_leases(lease_data, family):
from time import localtime
from time import strftime

from vyos.validate import is_intf_addr_assigned
from vyos.utils.network import is_intf_addr_assigned

data_entries = []
for lease in lease_data:
if not lease.get('new_ip_address'):
continue
data_entries.append(["Interface", lease['interface']])
if 'new_ip_address' in lease:
tmp = '[Active]' if is_intf_addr_assigned(lease['interface'], lease['new_ip_address']) else '[Inactive]'
Expand Down

0 comments on commit d3da152

Please sign in to comment.