mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 16:17:20 +00:00
ignore ip6 link local address on ssdp discovery (#69135)
This commit is contained in:
parent
1a04dc4fca
commit
55c6112a28
@ -1,6 +1,7 @@
|
|||||||
"""Config flow to configure the FRITZ!Box Tools integration."""
|
"""Config flow to configure the FRITZ!Box Tools integration."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import ipaddress
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -129,6 +130,9 @@ class FritzBoxToolsFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
)
|
)
|
||||||
self.context[CONF_HOST] = self._host
|
self.context[CONF_HOST] = self._host
|
||||||
|
|
||||||
|
if ipaddress.ip_address(self._host).is_link_local:
|
||||||
|
return self.async_abort(reason="ignore_ip6_link_local")
|
||||||
|
|
||||||
if uuid := discovery_info.upnp.get(ssdp.ATTR_UPNP_UDN):
|
if uuid := discovery_info.upnp.get(ssdp.ATTR_UPNP_UDN):
|
||||||
if uuid.startswith("uuid:"):
|
if uuid.startswith("uuid:"):
|
||||||
uuid = uuid[5:]
|
uuid = uuid[5:]
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
"abort": {
|
"abort": {
|
||||||
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
||||||
|
"ignore_ip6_link_local": "IPv6 link local address is not supported.",
|
||||||
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
|
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
"abort": {
|
"abort": {
|
||||||
"already_configured": "Device is already configured",
|
"already_configured": "Device is already configured",
|
||||||
"already_in_progress": "Configuration flow is already in progress",
|
"already_in_progress": "Configuration flow is already in progress",
|
||||||
|
"ignore_ip6_link_local": "IPv6 link local address is not supported.",
|
||||||
"reauth_successful": "Re-authentication was successful"
|
"reauth_successful": "Re-authentication was successful"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"already_configured": "Device is already configured",
|
"already_configured": "Device is already configured",
|
||||||
"already_in_progress": "Configuration flow is already in progress",
|
"already_in_progress": "Configuration flow is already in progress",
|
||||||
"cannot_connect": "Failed to connect",
|
"cannot_connect": "Failed to connect",
|
||||||
"connection_error": "Failed to connect",
|
|
||||||
"invalid_auth": "Invalid authentication",
|
"invalid_auth": "Invalid authentication",
|
||||||
"upnp_not_configured": "Missing UPnP settings on device."
|
"upnp_not_configured": "Missing UPnP settings on device."
|
||||||
},
|
},
|
||||||
@ -31,16 +31,6 @@
|
|||||||
"description": "Update FRITZ!Box Tools credentials for: {host}.\n\nFRITZ!Box Tools is unable to log in to your FRITZ!Box.",
|
"description": "Update FRITZ!Box Tools credentials for: {host}.\n\nFRITZ!Box Tools is unable to log in to your FRITZ!Box.",
|
||||||
"title": "Updating FRITZ!Box Tools - credentials"
|
"title": "Updating FRITZ!Box Tools - credentials"
|
||||||
},
|
},
|
||||||
"start_config": {
|
|
||||||
"data": {
|
|
||||||
"host": "Host",
|
|
||||||
"password": "Password",
|
|
||||||
"port": "Port",
|
|
||||||
"username": "Username"
|
|
||||||
},
|
|
||||||
"description": "Setup FRITZ!Box Tools to control your FRITZ!Box.\nMinimum needed: username, password.",
|
|
||||||
"title": "Setup FRITZ!Box Tools - mandatory"
|
|
||||||
},
|
|
||||||
"user": {
|
"user": {
|
||||||
"data": {
|
"data": {
|
||||||
"host": "Host",
|
"host": "Host",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user