2008-03-13 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): never set the default route through an
			IPv4LL addressed device



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3449 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-03-13 20:25:06 +00:00
parent 6cfaab9c0c
commit 5fa56a8ba4
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-03-13 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): never set the default route through an
IPv4LL addressed device
2008-03-13 Dan Williams <dcbw@redhat.com>
* NetworkManagerUtils.c

View file

@ -121,12 +121,25 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update)
devices = nm_manager_get_devices (policy->manager);
for (iter = devices; iter; iter = g_slist_next (iter)) {
NMDevice *dev = NM_DEVICE (iter->data);
NMActRequest *req;
NMConnection *connection;
NMSettingIP4Config *s_ip4;
guint32 prio;
if ( (nm_device_get_state (dev) != NM_DEVICE_STATE_ACTIVATED)
|| !nm_device_get_ip4_config (dev))
continue;
req = nm_device_get_act_request (dev);
g_assert (req);
connection = nm_act_request_get_connection (req);
g_assert (connection);
/* Never set the default route through an IPv4LL-addressed device */
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP))
continue;
prio = get_device_priority (dev);
if (prio > best_prio) {
best = dev;