diff options
| author | Michael Biebl <biebl@debian.org> | 2022-01-13 22:34:27 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-01-13 22:34:27 +0100 |
| commit | dd97d276b5d70c3397a4e59c978ca5228f06ba44 (patch) | |
| tree | 5fb3f5e0f5da28e39d3261d50561349a512ba297 /src/nmtui/nm-editor-utils.c | |
| parent | 3e2f6719468f8d957ae3cb112f3cb75b9c82d6a7 (diff) | |
| parent | 88c227d90a6b7b388c5c85d72802a0ca8f05ed5c (diff) | |
Update upstream source from tag 'upstream/1.34.0'
Update to upstream version '1.34.0' with Debian dir b598c27ee9cef517760bc745aa6a3bb7d9fb2ecb
Diffstat (limited to 'src/nmtui/nm-editor-utils.c')
| -rw-r--r-- | src/nmtui/nm-editor-utils.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/nmtui/nm-editor-utils.c b/src/nmtui/nm-editor-utils.c index c6b03bd8..2b6acbbe 100644 --- a/src/nmtui/nm-editor-utils.c +++ b/src/nmtui/nm-editor-utils.c @@ -16,7 +16,7 @@ #include "nm-editor-utils.h" #if 0 - #include "libnmc-base/nm-vpn-helpers.h" +#include "libnmc-base/nm-vpn-helpers.h" static GSList *vpn_plugins; @@ -66,6 +66,22 @@ bond_connection_setup_func(NMConnection *connection, NMSettingConnection *s_con, } } +static void +wireguard_connection_setup_func(NMConnection * connection, + NMSettingConnection *s_con, + NMSetting * s_hw) +{ + NMSettingIPConfig *s_ip; + + s_ip = (NMSettingIPConfig *) nm_setting_ip4_config_new(); + g_object_set(s_ip, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_DISABLED, NULL); + nm_connection_add_setting(connection, (NMSetting *) s_ip); + + s_ip = (NMSettingIPConfig *) nm_setting_ip6_config_new(); + g_object_set(s_ip, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_DISABLED, NULL); + nm_connection_add_setting(connection, (NMSetting *) s_ip); +} + typedef void (*NMEditorNewConnectionSetupFunc)(NMConnection * connection, NMSettingConnection *s_con, NMSetting * s_hw); @@ -243,6 +259,15 @@ nm_editor_utils_get_connection_type_list(void) } #endif + item = g_new0(NMEditorConnectionTypeDataReal, 1); + item->data.name = _("WireGuard"); + item->data.setting_type = NM_TYPE_SETTING_WIREGUARD; + item->data.device_type = NM_TYPE_DEVICE_WIREGUARD; + item->data.virtual = TRUE; + item->id_format = _("WireGuard connection %d"); + item->connection_setup_func = wireguard_connection_setup_func; + g_ptr_array_add(array, item); + g_ptr_array_sort(array, sort_types); g_ptr_array_add(array, NULL); |