Add support for capturing renewals to dhcp discovery (#48242)

This commit is contained in:
J. Nick Koston
2021-03-30 03:41:12 -10:00
committed by GitHub
parent b3b0904b94
commit f91de1c8b9
4 changed files with 77 additions and 4 deletions

View File

@@ -44,6 +44,11 @@ def is_local(address: IPv4Address | IPv6Address) -> bool:
return is_loopback(address) or is_private(address)
def is_invalid(address: IPv4Address | IPv6Address) -> bool:
"""Check if an address is invalid."""
return bool(address == ip_address("0.0.0.0"))
def is_ip_address(address: str) -> bool:
"""Check if a given string is an IP address."""
try: