Commit 06c16f14 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

optfrag.FAMILIES: move to new module

parent 2285a3c1
--[[
Address family module for Alpine Wall
Copyright (C) 2012-2019 Kaarle Ritvanen
See LICENSE file for license details
]]--
return {ALL={'inet', 'inet6'}}
--[[
Base data model for Alpine Wall
Copyright (C) 2012-2018 Kaarle Ritvanen
Copyright (C) 2012-2019 Kaarle Ritvanen
See LICENSE file for license details
]]--
......@@ -10,11 +10,11 @@ local M = {}
local loadclass = require('awall').loadclass
M.class = require('awall.class')
local FAMILIES = require('awall.family').ALL
local resolvelist = require('awall.host').resolvelist
local builtin = require('awall.iptables').builtin
local optfrag = require('awall.optfrag')
local FAMILIES = optfrag.FAMILIES
local combinations = optfrag.combinations
local prune = optfrag.prune
......
--[[
Filter module for Alpine Wall
Copyright (C) 2012-2017 Kaarle Ritvanen
Copyright (C) 2012-2019 Kaarle Ritvanen
See LICENSE file for license details
]]--
local loadclass = require('awall').loadclass
local FAMILIES = require('awall.family').ALL
local resolve = require('awall.host').resolve
local model = require('awall.model')
local class = model.class
local Rule = model.Rule
local optfrag = require('awall.optfrag')
local combinations = optfrag.combinations
local combinations = require('awall.optfrag').combinations
local util = require('awall.util')
local contains = util.contains
......@@ -444,7 +444,7 @@ local fchains = {{chain='FORWARD'}, {chain='INPUT'}, {chain='OUTPUT'}}
local function stateful(config)
local res = {}
for _, family in ipairs(optfrag.FAMILIES) do
for _, family in ipairs(FAMILIES) do
local er = combinations(
fchains,
......
--[[
Option fragment module for Alpine Wall
Copyright (C) 2012-2017 Kaarle Ritvanen
Copyright (C) 2012-2019 Kaarle Ritvanen
See LICENSE file for license details
]]--
local M = {}
local FAMILIES = require('awall.family').ALL
local util = require('awall.util')
local map = util.map
......@@ -14,8 +16,7 @@ local function ffrags(families)
return map(families, function(f) return {family=f} end)
end
M.FAMILIES = {'inet', 'inet6'}
M.FAMILYFRAGS = ffrags(M.FAMILIES)
M.FAMILYFRAGS = ffrags(FAMILIES)
function M.combinations(of1, ...)
local arg = {...}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment