Bug 606106 - miredo-client fails to notice resolv.conf changes
Summary: miredo-client fails to notice resolv.conf changes
Alias: None
Product: Fedora
Classification: Fedora
Component: miredo
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jens Kuehnel
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-20 16:43 UTC by Cesar Eduardo Barros
Modified: 2011-06-27 18:37 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2011-06-27 18:37:46 UTC

Attachments (Terms of Use)
Re-read resolv.conf before calling getaddrinfo (1.20 KB, patch)
2010-06-20 16:44 UTC, Cesar Eduardo Barros
no flags Details | Diff

Description Cesar Eduardo Barros 2010-06-20 16:43:35 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; pt-BR; rv: Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9

If you are using NetworkManager, /etc/resolv.conf might change often,
but its contents are cached by the stub resolver. If resolv.conf was
initially empty (which is a common case with NetworkManager), miredo
will fail forever to resolve the server name.

Reproducible: Always

Steps to Reproduce:
1.Install miredo-client on a machine which uses only a wireless network connection which is not automatically started on boot
2.Enable the miredo-client service to be started on boot (chkconfig miredo-client on), reboot and login
3.Connect to a wireless network via NetworkManager
Actual Results:  
Even though after connecting to the wireless network we have a working DNS server in /etc/resolv.conf, miredo-client still fails to find the server (saying so in the log).

Expected Results:  
The next time miredo-client tries to find the server, it notices NetworkManager has updated /etc/resolv.conf and uses the new DNS server.

This is basically the same as bug 354071.

I have a patch to re-read resolv.conf before every attempt to resolve the server name. Since there is a delay before every attempt, this will not cause performance problems. Tested lightly on a f13 i686 netbook.

While I am reporting this bug against f13, it probably also applies to f12 and f11.

Comment 1 Cesar Eduardo Barros 2010-06-20 16:44:49 UTC
Created attachment 425461 [details]
Re-read resolv.conf before calling getaddrinfo

Make the stub resolver read resolv.conf again just before calling
getaddrinfo(). Since it is called in a loop with a delay, this will not
cause performance problems.

Comment 2 Jens Kuehnel 2010-08-05 01:36:38 UTC

I added the patch to release 1.1.7-5, but the problem is not fixed with this patch.

I'm back from vacation and will talk with upstream about this problem.

Did you test the patch before committing it?


Comment 3 Cesar Eduardo Barros 2010-08-05 11:09:25 UTC
(I suppose you meant attaching instead of commiting.)

Yes, in fact I am using it right now both on this machine (x86-64) and on another one (the i686 netbook mentioned above), both using Fedora 13. Without the patch, I have to restart miredo-client after logging in, else it will not connect and will keep spamming the logs; with it, I have to do nothing, since it connects about less than a minute after I log in.

Here's exactly what I did on this machine (I did it yesterday in fact, so it was on my bash history):

- yumdownloader --source miredo-client
- rpm -i miredo-1.1.7-4.fc12.src.rpm (which unpacks it to ~/rpmbuild)
- Install the dependencies with "yum-builddep miredo-client"
- Download the attachment to this bug as ~/rpmbuild/SOURCES/miredo-bug606106.patch (so I am actually using the exact patch I attached here)
- Edit ~/rpmbuild/SPECS/miredo.spec to:
  - Change Release: to "4.local1%{?dist}"
  - Add below Patch0: a line with "Patch1:         miredo-bug606106.patch"
  - Add to %prep below %patch0 a line with "%patch1 -p1"
- Compile it with "rpmbuild -bb miredo.spec"
- Install the resulting packages with "yum --nogpgcheck upgrade miredo-client-1.1.7-4.local1.fc13.x86_64.rpm miredo-libs-1.1.7-4.local1.fc13.x86_64.rpm"

On the netbook, I have been using it for much longer (since just before reporting this bug).

I understand this patch is not ideal; the ideal would be to somehow listen on dbus to NetworkManager announcing the network is up and try to reconnect immediately. However, it is much less intrusive (and would still be needed even if it listened to NetworkManager).

Comment 4 Bug Zapper 2011-06-02 10:11:31 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 5 Bug Zapper 2011-06-27 18:37:46 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.