summaryrefslogtreecommitdiff
path: root/LICENSE
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-07-30 22:03:53 +0200
committerChristian Breunig <christian@breunig.cc>2023-07-30 22:03:55 +0200
commit1a44d8607f715934f2c03f28a9bf547321b26ed8 (patch)
treea226319e11fdf3968644663622ca9da17c7e8dad /LICENSE
parent78bb41eacb79ab3a359adcf3bd37af81ddc9aaa1 (diff)
downloadvyos-1x-1a44d8607f715934f2c03f28a9bf547321b26ed8.tar.gz
vyos-1x-1a44d8607f715934f2c03f28a9bf547321b26ed8.zip
T3355: always work with UNIX timestamps for dhcp client lease display
ISC dhcp client contains least_update timestamp in human readable format this makes less sense for an API and also the expiry timestamp is provided in UNIX time. Convert string (e.g. Sun Jul 30 18:13:44 CEST 2023) to UNIX time (1690733624) vyos@vyos:~$ ${vyos_op_scripts_dir}/dhcp.py show_client_leases --family inet --interface eth0.10 Interface eth0.10 IP address 172.16.33.123 [Active] Subnet Mask 255.255.255.0 Domain Name vyos.net Router 172.16.33.254 Name Server 172.16.254.30 DHCP Server 172.16.33.254 DHCP Server 86400 Last Update Sun Jul 30 18:13:44 CEST 2023 Expiry Mon Jul 31 18:13:43 CEST 2023 vyos@vyos:~$ ${vyos_op_scripts_dir}/dhcp.py show_client_leases --family inet --interface eth0.10 --raw [ { "last_update": 1690733624, "reason": "RENEW", "interface": "eth0.10", "new_expiry": "1690820023", "new_dhcp_lease_time": "86400", "medium": "", "alias_ip_address": "", "new_ip_address": "172.16.33.123", "new_broadcast_address": "172.16.33.255", "new_subnet_mask": "255.255.255.0", "new_domain_name": "vyos.net", "new_network_number": "172.16.33.0", "new_domain_name_servers": "172.16.254.30", "new_routers": "172.16.33.254", "new_static_routes": "", "new_dhcp_server_identifier": "172.16.33.254", "new_dhcp_message_type": "5", "old_ip_address": "172.16.33.123", "old_subnet_mask": "255.255.255.0", "old_domain_name": "vyos.net", "old_domain_name_servers": "172.16.254.30", "old_routers": "172.16.33.254", "old_static_routes": "" } ]
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions