res_mkupdate with SRV records

Cricket Liu cricket at acmebw.com
Fri Oct 8 22:23:15 UTC 1999


> I'm attempting to write client code in C that does dynamic updates against
> bind 8.2.1.  One of the updates is an addition/deletion of a SRV record.
>
> When I call res_update, I get back the message "res_mkupdate: error".
After
> hunting through the source for libresolv, it would appear that I'm falling
> into the default case of res_mkupdate.  The switch doesn't handle the
T_SRV
> case, so res_mkupdate returns -1.
>
> Does res_mkupdate really not know how to handle SRV records ?  The CHANGES
> file indicates that bug #61 was "Dynamic update didn't understand SRV
> records", but there is no case to handle either T_SRV or ns_t_srv in the
> code.  Other SRV-related bugs, like 595 (nsupdate failed to support quite
a
> few rr types, including srv) that are in the CHANGES file don't seem to be
> reflected in the code.  While nsupdate.c does have the mapping from "srv"
to
> T_SRV, it still doesn't seem to know how to take the textual
representation
> of "n n n host" and turn it into proper rdata.
>
> If I'm just misreading the code, can someone please tell me what I'm
missing
> here ?  If not, I think it will be pretty easy to extend the T_MX case
logic
> to handle T_SRV records (taking 3 int16 values instead of one), but
there's
> no point in duplicating work that has already been done.

Good man, reading the code and checking the CHANGES file!  I'm
impressed!

In newer versions of BIND, though, you'll see that the SRV problem was
fixed even more recently, before 8.2.2-T2B:

774.   [bug]           UPDATE did not support the SRV RR.

So you'll need T2B or better to do what you want to do.

cricket

Acme Byte & Wire
cricket at acmebw.com
www.acmebw.com

Attend our next DNS and BIND class!  See
www.acmebw.com/training.htm for the
schedule and to register for upcoming
classes.



More information about the bind-users mailing list