diff --git a/homeassistant/components/netgear/config_flow.py b/homeassistant/components/netgear/config_flow.py index 85c206ce463..79053c712fc 100644 --- a/homeassistant/components/netgear/config_flow.py +++ b/homeassistant/components/netgear/config_flow.py @@ -19,6 +19,7 @@ from homeassistant.const import ( ) from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult +from homeassistant.util.network import is_ipv4_address from .const import ( CONF_CONSIDER_HOME, @@ -129,6 +130,9 @@ class NetgearFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): hostname = cast(str, hostname) updated_data[CONF_HOST] = hostname + if not is_ipv4_address(str(hostname)): + return self.async_abort(reason="not_ipv4_address") + _LOGGER.debug("Netgear ssdp discovery info: %s", discovery_info) await self.async_set_unique_id(discovery_info.upnp[ssdp.ATTR_UPNP_SERIAL])