Re: Continuous DHCP?



On 06/12/11 22:34, Dan Williams wrote:
On Mon, 2011-12-05 at 17:21 +0000, Chris Paulson-Ellis wrote:
On 05/12/11 14:54, Chris Paulson-Ellis wrote:
On 05/12/11 12:34, Chris Paulson-Ellis wrote:
Is there some way to configure NetworkManager to keep running dhclient
and never give up?

NetworkManager-0.9.1.90-3.git20110927.fc15.x86_64

It seems commit fdfbe00aac3f17b19bb8d84cba1c8f210d90e8a0 is trying to
address my issue, but I'm not seeing anything in the logs after the 5
minute timeout.

I think the problem is that although reset_connections_retries() resets
the retry count, it doesn't call schedule_activate_check(), so the
device is never considered for auto-activation again (and I have nothing
else on the system that would cause schedule_activate_all() to be called).

I think we really want schedule_activate_all() there instead of
schedule_activate_check(), since connections can apply to zero to many
devices.  If you add that call there (and you'll have to copy&  paste
the prototype for schedule_activate_all above that function) does that
do what you want?  Either that or look at current git where I've pushed
a patch doing this.

Thanks Dan, that looks good.

I decided that even with a fix like this, the 5 minute timeout for the retries reset is a bit longer than I'd prefer for my application. So... I added a client that acts as a proxy for what a user would do using nm-applet if they were present. I start a 5s timer every time a wired interface changes to the disconnected state with carrier present. If the regular auto-activation changes the interface state, I cancel the timer, otherwise I activate the connection myself when the timeout expires, as if a user had noticed the failure and clicked on the failed connection in nm-applet.

Obviously making the number of retries or the retries reset timer configurable would be a simpler fix, but my client allows me to fix my problem in the short term without deploying a NetworkManager update :-).

If you'd like this program for examples/C/glib, I could post it.

Chris.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]