libnm/libnm-util: add VPN 'persistent' property

This property will indicate that the user wishes the VPN connection
to stay active until explicitly disconnected, even across link changes
or other interruptions.
This commit is contained in:
Dan Williams
2014-10-16 20:09:38 -05:00
parent 4b2935b9b8
commit 2b9e442013
5 changed files with 87 additions and 1 deletions

View File

@@ -35,6 +35,7 @@
#include "reader.h"
#include "common.h"
#include "utils.h"
#include "nm-core-internal.h"
/* Some setting properties also contain setting names, such as
* NMSettingConnection's 'type' property (which specifies the base type of the
@@ -616,7 +617,8 @@ read_hash_of_string (GKeyFile *file, NMSetting *setting, const char *key)
continue;
if (NM_IS_SETTING_VPN (setting)) {
if (strcmp (*iter, NM_SETTING_VPN_SERVICE_TYPE) && strcmp (*iter, NM_SETTING_VPN_USER_NAME))
/* Add any item that's not a class property to the data hash */
if (!g_object_class_find_property (G_OBJECT_GET_CLASS (setting), *iter))
nm_setting_vpn_add_data_item (NM_SETTING_VPN (setting), *iter, value);
}
if (NM_IS_SETTING_BOND (setting)) {