From cab046229e705f841945d793a5ef0afaf155a39f Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sun, 27 Dec 2015 21:19:24 +0000 Subject: [PATCH] implement ComboAddress:equal for lua --- pdns/lua-recursor4.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdns/lua-recursor4.cc b/pdns/lua-recursor4.cc index 4f4a6620c..9895c4090 100644 --- a/pdns/lua-recursor4.cc +++ b/pdns/lua-recursor4.cc @@ -166,6 +166,11 @@ RecursorLua4::RecursorLua4(const std::string& fname) d_lw->registerFunction("toString", [](const ComboAddress& ca) { return ca.toString(); }); d_lw->writeFunction("newCA", [](const std::string& a) { return ComboAddress(a); }); + + d_lw->registerFunction("equal", [](const ComboAddress& lhs, const ComboAddress& rhs) { + return ComboAddress::addressOnlyEqual()(lhs, rhs); + }); + d_lw->writeFunction("newNMG", []() { return NetmaskGroup(); }); d_lw->registerFunction("addMask", [](NetmaskGroup&nmg, const std::string& mask) { -- 2.40.0