nsupdate problems

nsupdate problems

Post by Jeff Murph » Thu, 10 Sep 1998 04:00:00



i'm trying to use nsupdate (8.1.1) to add an HINFO record, but it's not
working. what am i doing wrong?

thanks,

jeff

% nsupdate

Quote:> update: {add} undergradlab.physics.buffalo.edu. 86400 IN HINFO "SUN" "UNIX"

res_mkupdate: packet size = 74
;; res_send()
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
;; flags:; ZONE: 1, PREREQUISITE: 0, UPDATE: 1, ADDITIONAL: 0
;;      physics.buffalo.edu, type = SOA, class = IN
undergradlab.physics.buffalo.edu.  1D IN HINFO  ""\#(           ; RR format error
        22 53 55 4e 22 20 22 55 4e 49 58 22 )           ; "SUN" "UNIX"
;; Querying server (# 1) address = 128.205.1.2
;; got answer:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
;; flags: qr ra; ZONE: 0, PREREQUISITE: 0, UPDATE: 0, ADDITIONAL: 0
 
 
 

nsupdate problems

Post by John Hasca » Thu, 10 Sep 1998 04:00:00



Quote:}i'm trying to use nsupdate (8.1.1) to add an HINFO record, but it's not
}working. what am i doing wrong?
}thanks,
}jeff
}% nsupdate
}> update: {add} undergradlab.physics.buffalo.edu. 86400 IN HINFO "SUN" "UNIX"
}res_mkupdate: packet size = 74
};; res_send()
};; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
};; flags:; ZONE: 1, PREREQUISITE: 0, UPDATE: 1, ADDITIONAL: 0
};;      physics.buffalo.edu, type = SOA, class = IN
}undergradlab.physics.buffalo.edu.  1D IN HINFO  ""\#(   ; RR format error
}        22 53 55 4e 22 20 22 55 4e 49 58 22 )           ; "SUN" "UNIX"

     It's a bug.  There needs to be a length byte at the
     head of the text part.  An ugly work around is to
     included it when you type: ____________________________
                                                            \
update add undergradlab.physics.buffalo.edu. 86400 IN HINFO ^L"SUN" "UNIX"

     This, as you can see, sucks.

     It was not clear to me whether the right place to fix this was
     in nsupdate or in the resolver library, but I decided on the latter.

     It's a simple change.  In lib/resolv/res_mkupdate.c in the
     res_mkupdate() function at about like 297 you are in the middle
     of a case statement.  Make it look like this:

                case T_TXT:
                case T_HINFO:
                        ShrinkBuffer(1);            /* need to wedge in a */
                        *cp++ = rrecp->r_size;      /* length byte here! */
                case T_WKS:
                case T_X25:
                case T_ISDN:
                case T_NSAP:
                case T_LOC:
                        /* XXX - more fine tuning needed here */
                        ShrinkBuffer(rrecp->r_size);
                        memcpy(cp, rrecp->r_data, rrecp->r_size);
                        cp += rrecp->r_size;
                        break;

    I only did T_TXT and T_HINFO because we don't use any of those
    other RR types and so I have no idea if they need it or not.

John
--
John Hascall, Software Engr.      Shut up, be happy.  The conveniences you
ISU Computation Center            demanded are now mandatory. -Jello Biafra

http://www.cc.iastate.edu/staff/systems/john/index.html  <=- the usual crud

 
 
 

nsupdate problems

Post by Jeff Murph » Thu, 10 Sep 1998 04:00:00


after poking thru the source, it became obvious that the syntax
for the hinfo record update command is:

update: {add} undergradlab.physics.buffalo.edu. 86400 IN HINFO ^CSUN^DUNIX

where ^C (0x3) and ^D (0x4) denote the length of the two HINFO fields.


> i'm trying to use nsupdate (8.1.1) to add an HINFO record, but it's not
> working. what am i doing wrong?

> thanks,

> jeff

> % nsupdate
> > update: {add} undergradlab.physics.buffalo.edu. 86400 IN HINFO "SUN" "UNIX"

> res_mkupdate: packet size = 74
> ;; res_send()
> ;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
> ;; flags:; ZONE: 1, PREREQUISITE: 0, UPDATE: 1, ADDITIONAL: 0
> ;;      physics.buffalo.edu, type = SOA, class = IN
> undergradlab.physics.buffalo.edu.  1D IN HINFO  ""\#(           ; RR format error
>         22 53 55 4e 22 20 22 55 4e 49 58 22 )           ; "SUN" "UNIX"
> ;; Querying server (# 1) address = 128.205.1.2
> ;; got answer:
> ;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
> ;; flags: qr ra; ZONE: 0, PREREQUISITE: 0, UPDATE: 0, ADDITIONAL: 0

 
 
 

nsupdate problems

Post by Jeff Murph » Fri, 11 Sep 1998 04:00:00


well, this almost worked. unfortunately, certain control characters don't
work well. for example, if one of the HINFO fields happens to be
10 characters long, the control character winds up being 0xA (newline)
which causes nsupdate to fail to read the line correctly.


> after poking thru the source, it became obvious that the syntax
> for the hinfo record update command is:

> update: {add} undergradlab.physics.buffalo.edu. 86400 IN HINFO ^CSUN^DUNIX

> where ^C (0x3) and ^D (0x4) denote the length of the two HINFO fields.


> > i'm trying to use nsupdate (8.1.1) to add an HINFO record, but it's not
> > working. what am i doing wrong?

> > thanks,

> > jeff

> > % nsupdate
> > > update: {add} undergradlab.physics.buffalo.edu. 86400 IN HINFO "SUN" "UNIX"

> > res_mkupdate: packet size = 74
> > ;; res_send()
> > ;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
> > ;; flags:; ZONE: 1, PREREQUISITE: 0, UPDATE: 1, ADDITIONAL: 0
> > ;;      physics.buffalo.edu, type = SOA, class = IN
> > undergradlab.physics.buffalo.edu.  1D IN HINFO  ""\#(           ; RR format error
> >         22 53 55 4e 22 20 22 55 4e 49 58 22 )           ; "SUN" "UNIX"
> > ;; Querying server (# 1) address = 128.205.1.2
> > ;; got answer:
> > ;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 63023
> > ;; flags: qr ra; ZONE: 0, PREREQUISITE: 0, UPDATE: 0, ADDITIONAL: 0

 
 
 

1. Bind 8.2.3 on NT: nsupdate problems

Hi all,

Im runing Bin 8.2.3 on Win2K Prof, and even though i have properly
configured the named.conf to use dynamic updates (  allow-update {
10.0.1/24; }; ), when i use nsupdate, i get the following error (running
with -d(ebug) option set):

C:\Program files\BIND\bin>nsupdate -d
update add test.mydomain.com 3600 A 195.57.132.50

;; res_findzonecut: START dname='test.mydomain.com' class=IN, zsize=1025,
naddrs=3
;; res_findzonecut: get the soa, and see if it has enough glue
;; res_nmkquery(QUERY, test.mydomain.com., IN, SOA)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7480
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUERY SECTION:
;;      test.mydomain.com, type = SOA, class = IN

;; Querying server (# 1) address = 0.0.0.0
res_send: connect(dg) ([0.0.0.0].53): No such device
;; Querying server (# 1) address = 0.0.0.0
res_send: connect(dg) ([0.0.0.0].53): No such device
;; res_findzonecut: do_query: res_nsend failed
;; res_findzonecut: get_soa: do_query('test.mydomain.com.', IN) failed (-1)

;; res_findzonecut: FINISH n=-1 (Unknown error)
;; res_nupdate: res_findzonecut failed (-1)

It seems as if the program is not able to detect the IP address of the dns
server (nsupdate is run locally at the same server, so 127.0.0.1 would
work), but it tries to query the server at [0.0.0.0].53 which is not right.
Any ideas to make the proggie use the local server (127.0.0.1) or any other
IP address (if run remotely) ? There are no command line options for that.
Do i need to create a config file for nsupdate? By the way, the machine
runing the dns service and where im trying to run nsupdate from, has dns
configured for use itself  (network properties, dns servers).

Thanks in advance.

2. VB 3.0 and Oracle Problem.

3. nsupdate problem

4. IE6 Connection Turmoil

5. Fw: nsupdate problem

6. MMC's

7. nsupdate problem

8. Registering Z80 program

9. Problem with using nsupdate to delete NS record

10. Problem with NSUPDATE

11. Problem with nsupdate and journal file with Bind9

12. problem with nsupdate

13. Problem using nsupdate with DNSSEC