From dbef4237e9c1a29f22e73a66b368c04457a43269 Mon Sep 17 00:00:00 2001 From: Daniel Nilsson Date: Sun, 17 Mar 2024 22:14:34 +0100 Subject: [PATCH] luci-app-dockerman: check for existing IPAM config This was added in upstream with https://github.com/lisaac/luci-app-dockerman/commit/7292955a1b415bb60fa2e403bb3a437b4b7f7846 so should be fine for us to add it. Signed-off-by: Daniel Nilsson (cherry picked from commit a5d7ce06f96436dcf02970d5df8c68b65968e37c) --- applications/luci-app-dockerman/Makefile | 2 +- .../luasrc/model/cbi/dockerman/networks.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-dockerman/Makefile b/applications/luci-app-dockerman/Makefile index f4d1030860..5556ea590e 100644 --- a/applications/luci-app-dockerman/Makefile +++ b/applications/luci-app-dockerman/Makefile @@ -12,7 +12,7 @@ PKG_LICENSE:=AGPL-3.0 PKG_MAINTAINER:=lisaac \ Florian Eckert -PKG_VERSION:=v0.5.13-20230114 +PKG_VERSION:=v0.5.13-20240317 include ../../luci.mk diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua index 007e087424..f54acbd16d 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua @@ -38,8 +38,8 @@ local get_networks = function () data[index]["_interface"] = v.Options.parent end - data[index]["_subnet"] = v.IPAM and v.IPAM.Config[1] and v.IPAM.Config[1].Subnet or nil - data[index]["_gateway"] = v.IPAM and v.IPAM.Config[1] and v.IPAM.Config[1].Gateway or nil + data[index]["_subnet"] = v.IPAM and v.IPAM.Config and v.IPAM.Config[1] and v.IPAM.Config[1].Subnet or nil + data[index]["_gateway"] = v.IPAM and v.IPAM.Config and v.IPAM.Config[1] and v.IPAM.Config[1].Gateway or nil end return data -- 2.30.2