mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
2008-08-07 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c - (nm_dhcp_manager_get_ip4_config): fix regression which caused mis-handling of DHCP responses that returned more than one router (found by Grant Williamson) git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3908 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
641a7072b8
commit
1fa6715103
|
@ -1,3 +1,10 @@
|
||||||
|
2008-08-07 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/dhcp-manager/nm-dhcp-manager.c
|
||||||
|
- (nm_dhcp_manager_get_ip4_config): fix regression which caused
|
||||||
|
mis-handling of DHCP responses that returned more than one router
|
||||||
|
(found by Grant Williamson)
|
||||||
|
|
||||||
2008-08-07 Dan Williams <dcbw@redhat.com>
|
2008-08-07 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* callouts/nm-dispatcher-action.c
|
* callouts/nm-dispatcher-action.c
|
||||||
|
|
|
@ -747,9 +747,20 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
|
||||||
}
|
}
|
||||||
|
|
||||||
str = g_hash_table_lookup (device->options, "new_routers");
|
str = g_hash_table_lookup (device->options, "new_routers");
|
||||||
if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) {
|
if (str) {
|
||||||
addr->gateway = tmp_addr.s_addr;
|
char **routers = g_strsplit (str, " ", 0);
|
||||||
nm_info(" gateway %s", str);
|
char **s;
|
||||||
|
|
||||||
|
for (s = routers; *s; s++) {
|
||||||
|
/* FIXME: how to handle multiple routers? */
|
||||||
|
if (inet_pton (AF_INET, *s, &tmp_addr) > 0) {
|
||||||
|
addr->gateway = tmp_addr.s_addr;
|
||||||
|
nm_info (" gateway %s", *s);
|
||||||
|
break;
|
||||||
|
} else
|
||||||
|
nm_warning ("Ignoring invalid gateway '%s'", *s);
|
||||||
|
}
|
||||||
|
g_strfreev (routers);
|
||||||
}
|
}
|
||||||
|
|
||||||
nm_ip4_config_take_address (ip4_config, addr);
|
nm_ip4_config_take_address (ip4_config, addr);
|
||||||
|
|
Loading…
Reference in a new issue