Comparison

mod_firewall/mod_firewall.lua @ 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
parent 2368:7e1d8c46d788
child 2385:c0c2f8665c3e
comparison
equal deleted inserted replaced
2373:704e4845267b 2374:d630fa0d4dba
2 local resolve_relative_path = require "core.configmanager".resolve_relative_path; 2 local resolve_relative_path = require "core.configmanager".resolve_relative_path;
3 local logger = require "util.logger".init; 3 local logger = require "util.logger".init;
4 local it = require "util.iterators"; 4 local it = require "util.iterators";
5 5
6 local definitions = module:shared("definitions"); 6 local definitions = module:shared("definitions");
7 local active_definitions = {}; 7 local active_definitions = {
8 ZONE = {
9 -- Default zone that includes all local hosts
10 ["$local"] = setmetatable({}, { __index = prosody.hosts });
11 }
12 };
8 13
9 local default_chains = { 14 local default_chains = {
10 preroute = { 15 preroute = {
11 type = "event"; 16 type = "event";
12 priority = 0.1; 17 priority = 0.1;