This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: resolver with IPv6 transport support


   From: <venaas@nvg.ntnu.no>
   Date:   Sun, 23 Jul 2000 23:39:14 +0200

   On Sun, Jul 23, 2000 at 10:26:36PM +0200, Mark Kettenis wrote:
   > As Ulrich already said, you cannot touch anything before the first
   > member that says it's PRIVATE.
   > 
   > Also note that res_nsend() goes to considerable trouble to detect when
   > nsaddr_list is modified.  That's what the funky union and the EXT
   > macro are there for.

   It is pretty nasty to allow for changes to nsaddr_list, but I'll see
   what I can do. The patch is starting to get ugly though. It might be
   helpful if I know how to detect changes. I have trouble finding the
   union and EXT, I guess I'm demonstrating my incompetence.

You are working from the current CVS sources aren't you?  The union is
in resolv.h and the EXT macro is in res_send.c.  They were introduced
in the last upgrade to BIND 8.2.3-T5B.

   I'll sort it out somehow, but if you feel like explaining in more
   detail that would help.

The code keeps a private copy of the nsaddr_list and caches the
sockets.  That's what the union is there for.  It compares the
nsaddr_list with its private copy and if there are any changes it
cleans up properly before opening a sockets for the new name servers.
It's probably a good idea to replace the union with a pointer to some
malloced space where you keep the private copies of the nameserver
addresses, including any IPv6 adresses you have.

Now, when reading /etc/resolv.conf you'll add any IPv4 addresses from
the nameserver statement to the nsaddr_list, and IPv6 addresses to the
private list, leaving room for the cached IPv4 addresses in the right
spots.

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]