diff options
| author | Michael Biebl <biebl@debian.org> | 2022-02-14 19:23:28 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-02-14 19:23:28 +0100 |
| commit | 2f94dba7385fd0e0ef19a06eb4a2fcf6c43d7946 (patch) | |
| tree | e2222f5577115985dd52044d2991253403cdd952 /src/core/devices/nm-device-tun.c | |
| parent | 88c227d90a6b7b388c5c85d72802a0ca8f05ed5c (diff) | |
New upstream version 1.35.91 upstream/1.35.91
Diffstat (limited to 'src/core/devices/nm-device-tun.c')
| -rw-r--r-- | src/core/devices/nm-device-tun.c | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/src/core/devices/nm-device-tun.c b/src/core/devices/nm-device-tun.c index 0ab08f65..b6c4f88b 100644 --- a/src/core/devices/nm-device-tun.c +++ b/src/core/devices/nm-device-tun.c @@ -13,7 +13,6 @@ #include "nm-act-request.h" #include "nm-device-private.h" -#include "nm-ip4-config.h" #include "libnm-platform/nm-platform.h" #include "nm-device-factory.h" #include "nm-setting-tun.h" @@ -56,7 +55,7 @@ G_DEFINE_TYPE(NMDeviceTun, nm_device_tun, NM_TYPE_DEVICE) static void update_properties_from_struct(NMDeviceTun *self, const NMPlatformLnkTun *props) { - NMDeviceTunPrivate * priv = NM_DEVICE_TUN_GET_PRIVATE(self); + NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE(self); const NMPlatformLnkTun props0 = {}; if (!props) { @@ -129,11 +128,11 @@ link_changed(NMDevice *device, const NMPlatformLink *pllink) } static gboolean -complete_connection(NMDevice * device, - NMConnection * connection, - const char * specific_object, +complete_connection(NMDevice *device, + NMConnection *connection, + const char *specific_object, NMConnection *const *existing_connections, - GError ** error) + GError **error) { NMSettingTun *s_tun; @@ -162,12 +161,12 @@ complete_connection(NMDevice * device, static void update_connection(NMDevice *device, NMConnection *connection) { - NMDeviceTun * self = NM_DEVICE_TUN(device); + NMDeviceTun *self = NM_DEVICE_TUN(device); NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE(self); - NMSettingTun * s_tun; + NMSettingTun *s_tun; NMSettingTunMode mode; char s_buf[100]; - const char * str; + const char *str; /* Note: since we read tun properties from sysctl for older kernels, * we don't get proper change notifications. Make sure that all our @@ -217,15 +216,15 @@ update_connection(NMDevice *device, NMConnection *connection) } static gboolean -create_and_realize(NMDevice * device, - NMConnection * connection, - NMDevice * parent, +create_and_realize(NMDevice *device, + NMConnection *connection, + NMDevice *parent, const NMPlatformLink **out_plink, - GError ** error) + GError **error) { - const char * iface = nm_device_get_iface(device); + const char *iface = nm_device_get_iface(device); NMPlatformLnkTun props = {}; - NMSettingTun * s_tun; + NMSettingTun *s_tun; gint64 owner; gint64 group; int r; @@ -287,10 +286,10 @@ _same_og(const char *str, gboolean og_valid, guint32 og_num) static gboolean check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { - NMDeviceTun * self = NM_DEVICE_TUN(device); + NMDeviceTun *self = NM_DEVICE_TUN(device); NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE(self); NMSettingTunMode mode; - NMSettingTun * s_tun; + NMSettingTun *s_tun; if (!NM_DEVICE_CLASS(nm_device_tun_parent_class) ->check_connection_compatible(device, connection, error)) @@ -361,7 +360,7 @@ check_connection_compatible(NMDevice *device, NMConnection *connection, GError * static NMActStageReturn act_stage1_prepare(NMDevice *device, NMDeviceStateReason *out_failure_reason) { - NMDeviceTun * self = NM_DEVICE_TUN(device); + NMDeviceTun *self = NM_DEVICE_TUN(device); NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE(self); if (priv->props.type == IFF_TUN) { @@ -390,9 +389,9 @@ unrealize_notify(NMDevice *device) static void get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NMDeviceTun * self = NM_DEVICE_TUN(object); + NMDeviceTun *self = NM_DEVICE_TUN(object); NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE(self); - const char * s; + const char *s; switch (prop_id) { case PROP_OWNER: @@ -458,9 +457,9 @@ static const NMDBusInterfaceInfoExtended interface_info_device_tun = { static void nm_device_tun_class_init(NMDeviceTunClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS(klass); - NMDeviceClass * device_class = NM_DEVICE_CLASS(klass); + NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); object_class->get_property = get_property; @@ -531,11 +530,11 @@ nm_device_tun_class_init(NMDeviceTunClass *klass) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_TUN_DEVICE_FACTORY, NMTunDeviceFactory)) static NMDevice * -create_device(NMDeviceFactory * factory, - const char * iface, +create_device(NMDeviceFactory *factory, + const char *iface, const NMPlatformLink *plink, - NMConnection * connection, - gboolean * out_ignore) + NMConnection *connection, + gboolean *out_ignore) { g_return_val_if_fail(!plink || plink->type == NM_LINK_TYPE_TUN, NULL); g_return_val_if_fail(!connection |