From 44673977c80247317c2168a9dce479c714cdc4a9 Mon Sep 17 00:00:00 2001 From: sbwml Date: Tue, 2 Apr 2024 18:28:44 +0800 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: sbwml --- Makefile | 2 +- luasrc/model/cbi/dockerman/networks.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 296da8a..4ac3550 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ PKG_LICENSE:=AGPL-3.0 PKG_MAINTAINER:=lisaac \ Florian Eckert -PKG_VERSION:=v0.5.13-20230114 +PKG_VERSION:=v0.5.13-20240317 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luasrc/model/cbi/dockerman/networks.lua b/luasrc/model/cbi/dockerman/networks.lua index 007e087..f54acbd 100644 --- a/luasrc/model/cbi/dockerman/networks.lua +++ b/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