[PATCH] Use samba-tool to add DNS entries with samba_dnsupdate

Andreas Schneider asn at samba.org
Mon Mar 2 01:25:01 MST 2015


On Monday 02 March 2015 14:00:49 Andrew Bartlett wrote:
> Andreas,

Andrew,
 
> Can you explain why you couldn't use nsupdate in make test?  Either way,
> I think this might unblock your work on resolv_wrapper.

nsupdate is sending a lookup for the SOA record to the dns server but the 
response fromt our internal DNS server is incorrect so it fails.

To reproduce it edit selftest/wscript:

221     # FIXME REMOVE ME!
222     env.OPTIONS += " --use-dns-faking"

Remove the line above, then run:

	make testenv SAMBA_OPTIONS=-d10


In the testenv window run:

	SOCKET_WRAPPER_PCAP_FILE=nsupdate.pcap nsupdate -g


This will give you an interactive prompt:

   server 127.0.0.21
   update add wurst.samba.example.com. 900 AAAA fd00::5357:5f20
   show
   send


This should add a new DNS entry in the DNS server but it will fail cause we 
send and invalid response to the SOA lookup. We always return the same packet 
with an error code which is wrong. In the SOA case it should return the IP of 
the master DNS server, in this case of our DC. The TSIG handling is also wrong 
...

Kai started to work on a fix but it turned out to be more complex then 
thought, see:

https://git.samba.org/?p=kai/samba.git;a=shortlog;h=refs/heads/dns-soa-authority-rr


This is the reason why I was not able to use our internal DNS server with 
resolv_wrapper.


Cheers,


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list