mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
lualoader: Always return a proper dictionary for blacklist
If module_blacklist isn't specified, we have an empty blacklist; effectively the same as if module_blacklist="" were specified in loader.conf(5). This was reported when switching to a BE that predated the module_blacklist introduction, but the problem is valid all the same and likely to be tripped over in other scenarios. Reported by: bwidawsk MFC after: 3 days
This commit is contained in:
parent
0db665bb98
commit
e1f1ddeb35
1 changed files with 2 additions and 2 deletions
|
|
@ -266,12 +266,12 @@ local function isValidComment(line)
|
|||
end
|
||||
|
||||
local function getBlacklist()
|
||||
local blacklist = {}
|
||||
local blacklist_str = loader.getenv('module_blacklist')
|
||||
if blacklist_str == nil then
|
||||
return nil
|
||||
return blacklist
|
||||
end
|
||||
|
||||
local blacklist = {}
|
||||
for mod in blacklist_str:gmatch("[;, ]?([%w-_]+)[;, ]?") do
|
||||
blacklist[mod] = true
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue