Re-add WINS support to the IPv4 config

Don't do anything with WINS servers (dispatcher scripts installed with
samba could certainly update samba's idea of WINS servers), but at least
provide them so that the VPNs that can get upstream WINS servers can
at least make other stuff aware of them.
This commit is contained in:
Dan Williams
2008-12-19 17:01:06 -05:00
parent 706118b9db
commit a020ed21da
10 changed files with 197 additions and 17 deletions

View File

@@ -840,6 +840,21 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
g_strfreev (searches);
}
str = g_hash_table_lookup (device->options, "new_netbios_name_servers");
if (str) {
char **searches = g_strsplit (str, " ", 0);
char **s;
for (s = searches; *s; s++) {
if (inet_pton (AF_INET, *s, &tmp_addr) > 0) {
nm_ip4_config_add_wins (ip4_config, tmp_addr.s_addr);
nm_info (" wins '%s'", *s);
} else
nm_warning ("Ignoring invalid WINS server '%s'", *s);
}
g_strfreev (searches);
}
str = g_hash_table_lookup (device->options, "new_static_routes");
if (str) {
char **searches = g_strsplit (str, " ", 0);