From c7eacc3fe7992caf2e1e36dfb62204a640892446 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 21 Dec 2017 15:31:43 +0100 Subject: [PATCH] Fixed docker network assignments list and associated help text --- .../DockerSettings.page | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/plugins/dynamix.docker.manager/DockerSettings.page b/plugins/dynamix.docker.manager/DockerSettings.page index 4fdb58d5b..e540eb047 100644 --- a/plugins/dynamix.docker.manager/DockerSettings.page +++ b/plugins/dynamix.docker.manager/DockerSettings.page @@ -53,8 +53,12 @@ foreach ($other as $network) { $include = []; $include6 = []; foreach ($custom as $network) { - if ($route = exec("ip -4 route show dev $network|grep -Po '^[12]\S+'")) $include[$network] = $route; - if ($route6 = exec("ip -6 route show dev $network|grep -Po '^[1-9]\S+'")) $include6[$network] = $route6; + unset($address,$address6); + exec("ip -4 addr show $network|awk '/inet /{print $2}'",$address); + exec("ip -6 addr show $network noprefixroute|awk '/inet6 /{print $2}'",$address6); + exec("ip -6 addr show $network scope global permanent|awk '/inet6 /{print $2}'",$address6); + foreach ($address as $ip4) if ($route = exec("ip -4 route show dev $network $ip4|awk '{print $1}'")) $include[$network] = $route; + foreach ($address6 as $ip6) if ($route6 = exec("ip -6 route show dev $network $ip6|awk '{print $1}'")) $include6[$network] = $route6; } function base_min($route) { list($net,$mask) = explode('/',$route); @@ -260,7 +264,14 @@ DHCPv4 pool of custom network : -> Enter a pool range within the allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25 + + +> Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25 + + +> Pool range(s) assigned to DHCPv4 for Docker containers. + + $route):?> @@ -287,8 +298,15 @@ DHCPv6 pool of custom network : : -> Enter a pool range within the allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/80 + + +> Enter the pool range within each allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/72 + + +> Pool range(s) assigned to DHCPv6 for Docker containers. + +   :