diff options
author | Thomas Haller <thaller@redhat.com> | 2018-12-27 16:48:30 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-22 11:00:10 +0100 |
commit | b521f426ab228b003e1e87348e116291d23dc88b (patch) | |
tree | b4e1d229a747e42dc441935838ad2dc16b2acfec /src/devices/nm-device-wireguard.c | |
parent | 1d47643d954d69aa6be86a0f308111da9f926389 (diff) | |
download | NetworkManager-b521f426ab228b003e1e87348e116291d23dc88b.tar.gz |
libnm,cli: add NMSettingWireGuard
For now only add the core settings, no peers' data.
To support peers and the allowed-ips of the peers is more complicated
and will be done later. It's more complicated because these are nested
lists (allowed-ips) inside a list (peers). That is quite unusual and to
conveniently support that in D-Bus API, in keyfile format, in libnm,
and nmcli, is a effort.
Also, it's further complicated by the fact that each peer has a secret (the
preshared-key). Thus we probably need secret flags for each peer, which
is a novelty as well (until now we require a fixed set of secrets per
profile that is well known).
Diffstat (limited to 'src/devices/nm-device-wireguard.c')
-rw-r--r-- | src/devices/nm-device-wireguard.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/nm-device-wireguard.c b/src/devices/nm-device-wireguard.c index 62ec027494..0ca8cf3a5a 100644 --- a/src/devices/nm-device-wireguard.c +++ b/src/devices/nm-device-wireguard.c @@ -21,6 +21,8 @@ #include "nm-device-wireguard.h" +#include "nm-setting-wireguard.h" + #include "nm-device-private.h" #include "platform/nm-platform.h" #include "nm-device-factory.h" @@ -30,6 +32,11 @@ _LOG_DECLARE_SELF(NMDeviceWireGuard); /*****************************************************************************/ +G_STATIC_ASSERT (NM_WIREGUARD_PUBLIC_KEY_LEN == NMP_WIREGUARD_PUBLIC_KEY_LEN); +G_STATIC_ASSERT (NM_WIREGUARD_SYMMETRIC_KEY_LEN == NMP_WIREGUARD_SYMMETRIC_KEY_LEN); + +/*****************************************************************************/ + NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceWireGuard, PROP_PUBLIC_KEY, PROP_LISTEN_PORT, |