Re: dlz-bdbhpt-dynamic - a dlopen bdbhpt DLZ driver

Mark Goldfinch <[email protected]> Mon, 16 Jul 2012 21:33:10 +1200
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <CAK7eGc1J7pVmKH_jjBLGELz+x4+r0=THkG94HM4sPXwXp-obSg@mail.gmail.com>
--===============4819045924162182727==
Content-Type: multipart/alternative; boundary=047d7b15ae4540028104c4ef1e7e

--047d7b15ae4540028104c4ef1e7e
Content-Type: text/plain; charset=ISO-8859-1

Greetings,

On 16 July 2012 21:16, Jan-Piet Mens <[email protected]> wrote:

> No, it's not the Makefile.
>
> Looking into this a bit deeper, the DLZ example from BIND -9.9.1 contrib
> doesn't call dns_sdlz_putrr() directly. (Neither do I because I swiped
> that code from the example.) E.g.:
>
>         result = state->putrr(lookup, "TXT", 0, buf);
>
> which results in (what's it called?: LAZY_LOADING) ?
>
> Your code calls the function explicitly:
>
>         result = dns_sdlz_putrr(lookup, pd.type, pd.ttl, pd.data);
>
> and the linker, at least here, can't find that symbol.
>
> If I add the following huge pile of libs, I can get it to link:
>
>         $(CC) $(CFLAGS) -shared -o dlz_bdbhpt_dynamic.so
> dlz_bdbhpt_dynamic.o \
>                 $(BDB_LIBS) \
>                 -lisc -ldns -lssl \             # ISC stuff
>                 -lcrypto -lkrb5 -lxml2          # required for above
>
> Just wanted to get that off to you. I'll test a bit now.
>

Ah good catch, yes the original bdbhpt_driver.c called these ISC functions
directly and your linker is correctly picking up that they're not actually
present.

I've renamed "state" to "db" to save some work of renaming things
throughout the code, but I've just pushed a change which should correctly
call these helper functions as passed by the DLZ dlopen driver.

If you pull down another copy does it correctly link for you now?

Thanks,
Mark.

--047d7b15ae4540028104c4ef1e7e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Greetings,<div><br><div class=3D"gmail_quote">On 16 July 2012 21:16, Jan-Pi=
et Mens <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" targe=
t=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">
No, it&#39;s not the Makefile.<br>
<br>
Looking into this a bit deeper, the DLZ example from BIND -9.9.1 contrib<br=
>
doesn&#39;t call dns_sdlz_putrr() directly. (Neither do I because I swiped<=
br>
that code from the example.) E.g.:<br>
<br>
=A0 =A0 =A0 =A0 result =3D state-&gt;putrr(lookup, &quot;TXT&quot;, 0, buf)=
;<br>
<br>
which results in (what&#39;s it called?: LAZY_LOADING) ?<br>
<br>
Your code calls the function explicitly:<br>
<br>
=A0 =A0 =A0 =A0 result =3D dns_sdlz_putrr(lookup, pd.type, pd.ttl, pd.data)=
;<br>
<br>
and the linker, at least here, can&#39;t find that symbol.<br>
<br>
If I add the following huge pile of libs, I can get it to link:<br>
<br>
=A0 =A0 =A0 =A0 $(CC) $(CFLAGS) -shared -o dlz_bdbhpt_dynamic.so dlz_bdbhpt=
_dynamic.o \<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $(BDB_LIBS) \<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -lisc -ldns -lssl \ =A0 =A0 =A0 =A0 =A0 =A0=
 # ISC stuff<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -lcrypto -lkrb5 -lxml2 =A0 =A0 =A0 =A0 =A0#=
 required for above<br>
<br>
Just wanted to get that off to you. I&#39;ll test a bit now.<br></blockquot=
e><div><br></div><div>Ah good catch, yes the original bdbhpt_driver.c calle=
d these ISC functions directly and your linker is correctly picking up that=
 they&#39;re not actually present.</div>
<div><br></div><div>I&#39;ve renamed &quot;state&quot; to &quot;db&quot; to=
 save some work of renaming things throughout the code, but I&#39;ve just p=
ushed a change which should correctly call these helper functions as passed=
 by the DLZ dlopen driver.</div>
<div><br></div><div>If you pull down another copy does it correctly link fo=
r you now?</div><div><br></div><div>Thanks,</div><div>Mark.</div></div></di=
v>

--047d7b15ae4540028104c4ef1e7e--


--===============4819045924162182727==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
--===============4819045924162182727==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Bind-dlz-testers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers

--===============4819045924162182727==--