2008-08-14 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): 'hso' devices can be default even if they
			don't have a gateway



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3964 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-08-14 18:59:58 +00:00
parent 7069202c90
commit 5fe8f48237
2 changed files with 11 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2008-08-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): 'hso' devices can be default even if they
don't have a gateway
2008-08-14 Dan Williams <dcbw@redhat.com>
* src/nm-device.c

View File

@@ -41,6 +41,7 @@
#include "nm-device.h"
#include "nm-device-wifi.h"
#include "nm-device-ethernet.h"
#include "nm-hso-gsm-device.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
#include "nm-dbus-manager.h"
@@ -132,7 +133,7 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update)
NMSettingIP4Config *s_ip4;
guint32 prio;
guint i;
gboolean have_gateway = FALSE;
gboolean can_default = FALSE;
if (nm_device_get_state (dev) != NM_DEVICE_STATE_ACTIVATED)
continue;
@@ -157,12 +158,13 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update)
addr = nm_ip4_config_get_address (ip4_config, i);
if (addr->gateway) {
have_gateway = TRUE;
can_default = TRUE;
break;
}
}
if (!have_gateway)
/* 'hso' devices never get a gateway from the remote end */
if (!can_default && !NM_IS_HSO_GSM_DEVICE (dev))
continue;
prio = get_device_priority (dev);