[Pdns-users] lua getlocaladdress in auth prequery

Klaus Darilion klaus.mailinglists at pernau.at
Tue Sep 15 11:06:32 UTC 2015


Hi Bert!

On 15.09.2015 11:45, bert hubert wrote:
> On Tue, Sep 15, 2015 at 11:24:44AM +0200, Klaus Darilion wrote:
>>> I tried Debian stable: 3.4.1-4+deb8u3
>>> I can also test 3.4.6-1~bpo8+1 (jessie-backports)
>>
>> The same problem with 3.4.6-1~bpo8+1 (jessie-backports)
> 
> Hi Klaus,
> 
> First, let me note that the Lua pre-query interface in auth is undocumented,
> and the feature is labelled "DO NOT USE" if you manage to find it in our
> --help output ;-)
> 
> However, you are correct in finding that getLocal() is not hooked up there. 
> 
> https://github.com/ahupowerdns/pdns/tree/getlocalauth has a fix for master,
> https://github.com/ahupowerdns/pdns/commit/995dd336b57bb234427b71dc6f20c93787361cc6

I applied the patch to 3.4.6 and it seems the changes have some more
implications:

libtool: compile:  i586-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../..
-pthread -D_FORTIFY_SOURCE=2 -I../.. -I../.. -DPIE -D_GNU_SOURCE -g -O2
-fstack-protector-strong -Wformat -Werror=format-security
"-DPACKAGEVERSION=\"3.4.6-1~bpo8+1~darilion.Debian\"" -fstack-protector
--param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT pipebackend.lo -MD -MP
-MF .deps/pipebackend.Tpo -c pipebackend.cc  -fPIC -DPIC -o
.libs/pipebackend.o
pipebackend.cc: In member function 'virtual void
PipeBackend::lookup(const QType&, const string&, DNSPacket*, int)':
pipebackend.cc:123:20: error: no match for 'operator=' (operand types
are 'string {aka std::basic_string<char>}' and 'ComboAddress')
             localIP=pkt_p->getLocal();
                    ^

and also:


libtool: compile:  i586-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../..
-I/usr/include/lua5.1 -pthread -D_FORTIFY_SOURCE=2 -I../.. -I../.. -DPIE
-D_GNU_SOURCE -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security
"-DPACKAGEVERSION=\"3.4.6-1~bpo8+1~darilion.Debian\"" -fstack-protector
--param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT lua_functions.lo -MD
-MP -MF .deps/lua_functions.Tpo -c lua_functions.cc  -fPIC -DPIC -o
.libs/lua_functions.o
lua_functions.cc: In function 'int l_dnspacket(lua_State*)':
lua_functions.cc:110:51: error: 'union ComboAddress' has no member named
'c_str'
     lua_pushstring(lua, lb->dnspacket->getLocal().c_str());
                                                   ^

I also have the same problems when building the getlocalauth branch.

regards
Klaus





More information about the Pdns-users mailing list