Modifying BIND to provide requesting IP address to sdb API
Mark_Andrews at isc.org
Wed May 7 06:54:03 UTC 2008
> I've written a custom SDB driver for BIND that interacts with a Python
> system I've already written. The only problem is that my SDB driver
> lookup function needs access to the requesting client's IP address (the
> IP address of the machine that originated the DNS query), not just the
> zone and hostname to resolve. I know that BIND has this information at
> some point, but then must not pass it into the sdb API. Are there any
> BIND developers lurking on this list that could point me in the right
> direction in terms of what I would need to do to modify the sdb API?
> Simple greps in the named source directory for "lookup" don't actually
> turn up any seemingly valid results, so I have no idea where the SDB
> drivers are even being invoked from.
> Any help would be much appreciated. Thanks.
The database interface is defined in lib/dns/include/dns/db.h.
It would have to be extended to pass pointers to addresses to
the appropriate method functions.
The client's address is stored in peeraddress of the ns_client_t
structure, see bin/named/include/named/client.h.
Lookup on the various databases are performed by bin/named/query.c.
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews at isc.org
More information about the bind-users