Changeset

4830:ea907059a90e

util.rfc3484: Don't pollute the global scope.
author Kim Alvefur <zash@zash.se>
date Thu, 10 May 2012 23:00:45 +0200
parents 4829:0ebc636faa59
children 4831:da2c49a9ab99
files util/rfc3484.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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];