Opened 10 years ago
Closed 9 years ago
#303 closed Bug / Defect (fixed)
Reconnect fails with DNS error, when network is switched
Reported by: | mihai | Owned by: | plaisthos |
---|---|---|---|
Priority: | major | Milestone: | release 2.3.7 |
Component: | Generic / unclassified | Version: | OpenVPN 2.3.1 (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | DNS |
Cc: | David Sommerseth |
Description
See detailed description in bug ID 966281 here https://bugzilla.redhat.com/show_bug.cgi?id=966281
Change History (4)
comment:1 Changed 10 years ago by
Keywords: | reconnect failure removed |
---|---|
Owner: | set to plaisthos |
Status: | new → assigned |
comment:2 Changed 10 years ago by
Note from cron2 in IRC:
"After the dual-stack patches [from plaisthos] are merged, this might or might not be resolved already."
Those patches still need final review.
comment:3 Changed 10 years ago by
Cc: | David Sommerseth added |
---|
Reading through the redhat bug, I don't think the dual-stack patches will magically fix this, though I find it highly likely that it might be related to the introduction of the ipv6-transport patch in 2.3.x - changing the DNS resolving in OpenVPN, possibly even from gethostbyname() to getaddrinfo().
From the description it sounds as if getaddrinfo() would cache the content of /etc/resolv.conf, not noticing that it should use newer information and keeps querying the now stale DNS servers it has. But I'd expect it to still stat() the file regularily and re-read if needed... but this would need closer examination, possibly strace'ing a 2.2.x and 2.3.x client when changing resolv.conf behind it's back.
David, does that ring any bell with you?
comment:4 Changed 9 years ago by
Milestone: | → release 2.3.7 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I *think* that this could be a copy of #523 - getaddrinfo() will not magically re-read /etc/hosts, but you need to call res_init() for that, which our configure script didn't properly handle on (recent) glibc systems.
So I just claim that the fix for #523 will also fix this one, refer to it, and close this ticket.
Patch is there: http://article.gmane.org/gmane.network.openvpn.devel/9614
Please reopen if you think this is a different issue.
This commit touches the DNS resolution stuff and is in 2.3.x but not 2.2.x. It might be the culprit, but someone needs to verify that.