res_mkupdate with SRV records

James FitzGibbon james at epoch.targetnet.lan
Fri Oct 8 19:11:53 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.

TIA.

.



More information about the bind-users mailing list