# HG changeset patch # User Kim Alvefur # Date 1336683645 -7200 # Node ID ea907059a90eb145131b47476e51ac8826e83caf # Parent 0ebc636faa594f36c8bf17f487b164cb5323f6e6 util.rfc3484: Don't pollute the global scope. diff -r 0ebc636faa59 -r ea907059a90e util/rfc3484.lua --- a/util/rfc3484.lua Thu May 10 05:57:24 2012 +0200 +++ b/util/rfc3484.lua Thu May 10 23:00:45 2012 +0200 @@ -19,7 +19,7 @@ end end -function source(dest, candidates) +local function source(dest, candidates) local function comp(ipA, ipB) -- Rule 1: Prefer same address if dest == ipA then @@ -70,7 +70,7 @@ return candidates[1]; end -function destination(candidates, sources) +local function destination(candidates, sources) local sourceAddrs = {}; local function comp(ipA, ipB) local ipAsource = sourceAddrs[ipA];