mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Update dhcp to use stdlib ipaddress methods (#100625)
This commit is contained in:
parent
33f748493e
commit
06c7f0959c
@ -58,7 +58,6 @@ from homeassistant.helpers.event import (
|
||||
from homeassistant.helpers.typing import ConfigType, EventType
|
||||
from homeassistant.loader import DHCPMatcher, async_get_dhcp
|
||||
from homeassistant.util.async_ import run_callback_threadsafe
|
||||
from homeassistant.util.network import is_invalid, is_link_local, is_loopback
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
@ -162,9 +161,9 @@ class WatcherBase(ABC):
|
||||
made_ip_address = make_ip_address(ip_address)
|
||||
|
||||
if (
|
||||
is_link_local(made_ip_address)
|
||||
or is_loopback(made_ip_address)
|
||||
or is_invalid(made_ip_address)
|
||||
made_ip_address.is_link_local
|
||||
or made_ip_address.is_loopback
|
||||
or made_ip_address.is_unspecified
|
||||
):
|
||||
# Ignore self assigned addresses, loopback, invalid
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user