Re: [PATCH] Fix manual IP config

Am Montag, 17. März 2008 17:14:34 schrieb Tambet Ingo:
> 2008/3/17 Helmut Schaa <hschaa suse de>:
> >  I had some problems with manual IP configuration being ignored by NM.
> >  Attached patch for trunk fixes it for me.
> I don't understand why or how this patch could fix the problem though.
> The call you added,
> nm_device_set_use_dhcp (self, FALSE);
> makes sure there's no DHCP manager associated with the device and
> that's already the state NMDevice has prior to activation state 3.

nm_device_get_use_dhcp returns true when "priv->dhcp_manager != NULL".

1. Since priv->dhcp_manager does not get initialized anywhere it may be != 
NULL but not set to a correct value. Therefore nm_device_get_use_dhcp will 
return true even when not using dhcp. Setting it explicitly with 
nm_device_set_use_dhcp (self, FALSE) works around this issue.

2. Assume a DHCP-connection on that device. When you switch to a manual 
connection priv->dhcp_manager remains set and therefor the manual IP 
configuration is ignored.


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