agreement amoung multiple BIND processes

matt wimer matt at thunder.cgibuilder.com
Thu Jul 1 09:45:19 UTC 1999


Hi,

Let me provide a little background info before
i launch into my questions.

I need a way to modify BIND to allow multiple
BIND processes to agree on a value to send out
to clients when clients request a lookup.

I will be running three or more BIND proccess
in the group of servers.  When a lookup is 
sent to one of the servers it will ask the other
processes in it's group what they "think" the
answer is.

In the case of three processes, atleast two 
processes have to have the same return value.

Currently i am trapping incoming messages in
the bin/named/ns_req.c:ns_req() function. I 
then see if they are of opcode ns_o_query.
(I think this is the correct opcode. :) If 
they are i don't allow they outgoing message
to be sent out.  

What i do instead is send a message to the 
other processes asking then to do a lookup on 
the dname.

Once those processes have sent back thier 
values i can then send out a reply to the
client.

My problem is:  I need a way to create a
generic message that i can use as a base for
the reply.  I can't seem to figure out how
to create a reply message that i can piece
together from the answers i get from the 
other BIND processes.

If someone could hack up some code that does
efectivly the following:

  out_message = new_out_message();

  set_header_data(out_message, REPLY_TO_LOOKUP);

  set_soa_record(out_message, my_soa);

  set_ip(out_message, my_ip);

  set_other_good_stuff(out_message, /*stuff that 
                       i will need*/);

  send_the_message(out_message);

If no one has the time to do something like this
maybe they could point me to some files:line_nums
that do the same thing for each line of my example.

If im to vauge please tell me.  Any help would 
really help.  if you have any questions or comments 
about this hack or about the agreement code just
send me an email.

--matt wimer


More information about the bind-users mailing list