Re: Getting NM to re-try DHCP



On Sat, 9 Apr 2011 04:01:09 +0400 Mikhail Efremov wrote:
> On Wed, 06 Apr 2011 17:24:44 -0500 Dan Williams wrote:
> > On Tue, 2011-04-05 at 11:37 -0400, Derek Atkins wrote:
> > > Hey all,
> > > 
> > > I have a strange issue.  I lost power last night and one of my
> > > systems came up before my DHCP server did (which is surprising,
> > > because my DHCP server usually comes up pretty quick!)  This
> > > "client" system was supposed to get itself on the network (it has
> > > an auto-logon system). However, NM didn't succeed because my DHCP
> > > server wasn't responding, yet.
> > > 
> > > This is a hard-wired system (not wireless).  Is there any way to
> > > get NM to periodically retry DHCP if at first it does not succeed?
> > > 
> > > I realize that DHCP has its own retry mechanism, but if the whole
> > > process times out, can I set NM to retry every, say, 5 minutes?
> > 
> > We'd need some code changes in NM; basically for wired connections
> > if the activation attempt fails a certain number of times
> > (currently 3) then the connection is marked "invalid".  What
> > probably should happen is that internally, in nm-policy.c, a
> > timeout handler should be scheduled for the connection (using
> > g_timeout_add_seconds()) that triggers after 5 minutes or so and if
> > the connection isn't currently active (ie check the NMManager's
> > active connection list) then the invalid flag is cleared from the
> > connection, which will let it be automatically retried.
> 
> Not on this issue exactly, but this is reminded me about my old patch
> which was written long time ago (it was just forgotten to submit,
> sorry). If cable was unplugged, then when it is replugged this may be
> another network, so NM should try to reconnect even if the connection
> was early marked as "invalid".
> This patch for the NM_0_8 branch, for master it should be remaked, but
> I have no time to do this right now, sorry. And there may be no
> necessary for a separate function to clear the tag.

BTW, I think in the function sleeping_changed() in nm-policy.c should be
called g_object_unref() for all connections,
nm_manager_get_connections() is still refered them in NM-0.8.

-- 
WBR, Mikhail Efremov


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