Commit 44d77a74 authored by Beniamino Galvani's avatar Beniamino Galvani

ifcfg-rh: add support for connection.llmnr

parent 481fce62
......@@ -2181,6 +2181,15 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass)
*
* Since: 1.14
**/
/* ---ifcfg-rh---
* property: llmnr
* variable: LLMNR(+)
* values: yes,no,resolve
* default: missing variable means global default
* description: Whether or not LLMNR is enabled for the connection
* example: LLMNR=yes
* ---end---
*/
g_object_class_install_property
(object_class, PROP_LLMNR,
g_param_spec_int (NM_SETTING_CONNECTION_LLMNR, "", "",
......
......@@ -554,6 +554,13 @@ make_connection_setting (const char *file,
PARSE_WARNING ("invalid MDNS setting");
g_object_set (s_con, NM_SETTING_CONNECTION_MDNS, i_val, NULL);
i_val = NM_SETTING_CONNECTION_LLMNR_DEFAULT;
if (!svGetValueEnum (ifcfg, "LLMNR",
nm_setting_connection_llmnr_get_type (),
&i_val, NULL))
PARSE_WARNING ("invalid LLMNR setting");
g_object_set (s_con, NM_SETTING_CONNECTION_LLMNR, i_val, NULL);
return NM_SETTING (s_con);
}
......
......@@ -1790,6 +1790,7 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
const char *master, *master_iface = NULL, *type;
int vint;
NMSettingConnectionMdns mdns;
NMSettingConnectionLlmnr llmnr;
guint32 vuint32;
const char *tmp;
......@@ -1960,6 +1961,13 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
mdns);
} else
svUnsetValue (ifcfg, "MDNS");
llmnr = nm_setting_connection_get_llmnr (s_con);
if (llmnr != NM_SETTING_CONNECTION_LLMNR_DEFAULT) {
svSetValueEnum (ifcfg, "LLMNR", nm_setting_connection_llmnr_get_type (),
llmnr);
} else
svUnsetValue (ifcfg, "LLMNR");
}
static char *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment