#991 dns:setnameserver does not correctly update the resolver
Reporter
pep.
Owner
MattJ
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Status-Fixed
Milestone-0.10
Type-Defect
pep.
on
What steps will reproduce the problem?
1. See in the logs (`journalctl -fu prosody`) that prosody is using resolver x.x.x.x
2. Have mod_admin_telnet loaded and open the console
3. `dns:setnameserver('y.y.y.y')`
What is the expected output?
Prosody now using y.y.y.y for dns requests.
What do you see instead?
Logs still show prosody using x.x.x.x.
What version of the product are you using? On what operating system?
Using Archlinux
aur/prosody-hg (trunk, b69b40a828fd)
# Lua module versions
lfs: LuaFileSystem 1.6.3
lxp: LuaExpat 1.3.0
socket: LuaSocket 3.0-rc1
ssl: 0.6
Please provide any additional information below.
`> for k,v pairs((require "net.dns")._resolver.server) do print(k,v) end` showed:
| 1 y.y.y.y
I also tried reloading s2s.
And I verified that I was looking at the correct logs with `> log('debug', 'Foo')`.
MattJ
on
Thanks for the report. On investigation I found that the new resolver was set, but not used unless the current server was invalidated (e.g. connection error). Although it should have timed out in your specific case, I think that's a separate problem.
In any case, all this should be fixed in 0.10 now (as part of #1001), so I'm going to close this.
What steps will reproduce the problem? 1. See in the logs (`journalctl -fu prosody`) that prosody is using resolver x.x.x.x 2. Have mod_admin_telnet loaded and open the console 3. `dns:setnameserver('y.y.y.y')` What is the expected output? Prosody now using y.y.y.y for dns requests. What do you see instead? Logs still show prosody using x.x.x.x. What version of the product are you using? On what operating system? Using Archlinux aur/prosody-hg (trunk, b69b40a828fd) # Lua module versions lfs: LuaFileSystem 1.6.3 lxp: LuaExpat 1.3.0 socket: LuaSocket 3.0-rc1 ssl: 0.6 Please provide any additional information below. `> for k,v pairs((require "net.dns")._resolver.server) do print(k,v) end` showed: | 1 y.y.y.y I also tried reloading s2s. And I verified that I was looking at the correct logs with `> log('debug', 'Foo')`.
Thanks for the report. On investigation I found that the new resolver was set, but not used unless the current server was invalidated (e.g. connection error). Although it should have timed out in your specific case, I think that's a separate problem. In any case, all this should be fixed in 0.10 now (as part of #1001), so I'm going to close this.
Changes