1
mirror of https://github.com/home-assistant/core synced 2024-09-03 08:14:07 +02:00

ignore ip6 link local address on ssdp discovery (#69135)

This commit is contained in:
Michael 2022-04-02 21:34:12 +02:00 committed by GitHub
parent 1a04dc4fca
commit 55c6112a28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -1,6 +1,7 @@
"""Config flow to configure the FRITZ!Box Tools integration."""
from __future__ import annotations
import ipaddress
import logging
import socket
from typing import Any
@ -129,6 +130,9 @@ class FritzBoxToolsFlowHandler(ConfigFlow, domain=DOMAIN):
)
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.startswith("uuid:"):
uuid = uuid[5:]

View File

@ -32,6 +32,7 @@
"abort": {
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"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%]"
},
"error": {

View File

@ -3,13 +3,13 @@
"abort": {
"already_configured": "Device is already configured",
"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"
},
"error": {
"already_configured": "Device is already configured",
"already_in_progress": "Configuration flow is already in progress",
"cannot_connect": "Failed to connect",
"connection_error": "Failed to connect",
"invalid_auth": "Invalid authentication",
"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.",
"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": {
"data": {
"host": "Host",