# HG changeset patch # User Matthew Wild # Date 1622906542 -3600 # Node ID cc20493018f6ded5723afaf70f99f07b007168fe # Parent 3e2e708fd18b0211df5527af02988f9d18fd6711 mod_firewall: Allow underscores in definition names diff -r 3e2e708fd18b -r cc20493018f6 mod_firewall/mod_firewall.lua --- a/mod_firewall/mod_firewall.lua Tue Jun 01 19:23:32 2021 +0200 +++ b/mod_firewall/mod_firewall.lua Sat Jun 05 16:22:22 2021 +0100 @@ -372,7 +372,7 @@ end ruleset[chain] = ruleset[chain] or {}; elseif not(state) and line:sub(1,1) == "%" then -- Definition (zone, limit, etc.) - local what, name = line:match("^%%%s*(%w+) +([^ :]+)"); + local what, name = line:match("^%%%s*([%w_]+) +([^ :]+)"); if not definition_handlers[what] then return nil, errmsg("Definition of unknown object: "..what); elseif not name or not idsafe(name) then