From e787e59b495b90114db0f5b0252a0392751d24c3 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 6 Apr 2020 14:00:52 +0200 Subject: [PATCH] Cleanup network (#1637) * Cleanup network forward * Add permission --- supervisor/api/security.py | 1 + supervisor/const.py | 1 - supervisor/docker/multicast.py | 7 ++----- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/supervisor/api/security.py b/supervisor/api/security.py index 559104c43..78a2a47ad 100644 --- a/supervisor/api/security.py +++ b/supervisor/api/security.py @@ -76,6 +76,7 @@ ADDONS_ROLE_ACCESS = { r"|/audio/.*" r"|/dns/.*" r"|/cli/.*" + r"|/multicast/.*" r"|/core/.+" r"|/homeassistant/.+" r"|/host/.+" diff --git a/supervisor/const.py b/supervisor/const.py index 7bb025e8e..513ba6c1f 100644 --- a/supervisor/const.py +++ b/supervisor/const.py @@ -68,7 +68,6 @@ HEADER_TOKEN_OLD = "X-Hassio-Key" ENV_TOKEN_OLD = "HASSIO_TOKEN" ENV_TOKEN = "SUPERVISOR_TOKEN" ENV_TIME = "TZ" -ENV_HASSIO_NETWORK = "HASSIO_NETWORK" ENV_HOMEASSISTANT_REPOSITORY = "HOMEASSISTANT_REPOSITORY" ENV_SUPERVISOR_SHARE = "SUPERVISOR_SHARE" diff --git a/supervisor/docker/multicast.py b/supervisor/docker/multicast.py index 7a033d4ea..6168d89cc 100644 --- a/supervisor/docker/multicast.py +++ b/supervisor/docker/multicast.py @@ -2,7 +2,7 @@ from contextlib import suppress import logging -from ..const import DOCKER_NETWORK_MASK, ENV_HASSIO_NETWORK, ENV_TIME +from ..const import ENV_TIME from ..coresys import CoreSysAttributes from ..exceptions import DockerAPIError from .interface import DockerInterface @@ -47,10 +47,7 @@ class DockerMulticast(DockerInterface, CoreSysAttributes): network_mode="host", detach=True, extra_hosts={"supervisor": self.sys_docker.network.supervisor}, - environment={ - ENV_TIME: self.sys_timezone, - ENV_HASSIO_NETWORK: str(DOCKER_NETWORK_MASK), - }, + environment={ENV_TIME: self.sys_timezone}, ) self._meta = docker_container.attrs