Mercurial > prosody-modules
changeset 2374:d630fa0d4dba
mod_firewall: Add default zone called '$local' containing all local hosts (dynamically)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 18 Nov 2016 17:22:28 +0000 |
parents | 704e4845267b |
children | 7ad312b4cefe |
files | mod_firewall/mod_firewall.lua |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua Fri Nov 18 10:22:28 2016 +0100 +++ b/mod_firewall/mod_firewall.lua Fri Nov 18 17:22:28 2016 +0000 @@ -4,7 +4,12 @@ local it = require "util.iterators"; local definitions = module:shared("definitions"); -local active_definitions = {}; +local active_definitions = { + ZONE = { + -- Default zone that includes all local hosts + ["$local"] = setmetatable({}, { __index = prosody.hosts }); + } +}; local default_chains = { preroute = {