diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2018-08-24 11:00:09 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2018-08-24 11:06:47 +0200 |
| commit | b7db94545968c37886b7111d8c85f62eb063fbb4 (patch) | |
| tree | 7c2aedd497b1fdcb26bf9d49f98cc63a530baf2e /src/devices/adsl | |
| parent | 9d5cdc3adde9e7e57bf5a0e754e563b6a9e8e513 (diff) | |
| parent | caf1db9d6fbc056cc6c76a24574890f6c7895f3d (diff) | |
Import Debian changes 1.12.2-0ubuntu3
network-manager (1.12.2-0ubuntu3) cosmic; urgency=medium
* debian/rules:
- use --with-libnm-glib, the default reversed since that's a legacy
library but we still need it for unity-control-center
network-manager (1.12.2-0ubuntu2) cosmic; urgency=medium
* debian/patches/git-newglib-test.patch:
- backport upstream commit to fix the tests with the new glib
network-manager (1.12.2-0ubuntu1) cosmic; urgency=medium
* New upstream version
* d/p/libnm-register-empty-NMClient-and-NetworkManager-when-loa.patch,
d/p/e91f1a7d2a6b8400b6b331d5b72287dcb5164a39.patch,
d/p/git_thunderbolt_connect.patch:
- removed, those changes are in the new version
* Backport Debian changes
* Update symbols file for libnm0
* Enable iwd support
* Drop version requirements when oldstable ships a newer version
* Drop dh_strip override, the dbgsym migration is done
* Rebase patches
* Make sure the example server.conf is actually installed
* Update install path for plugins, it now includes a version number
* Drop libnl3 build dependency.
Upstream has copied the code directly from libnl3 for the few functions it
needs with a few small modifications.
* Drop libiw build dependency.
Hasn't been needed for a long time and was simply a left over from older
releases.
* Bump Standards-Version to 4.1.5
* Fix compile error due to NM_AVAILABLE_IN_1_12_2 macro (Closes: #905372)
Diffstat (limited to 'src/devices/adsl')
| -rw-r--r-- | src/devices/adsl/meson.build | 34 | ||||
| -rw-r--r-- | src/devices/adsl/nm-atm-manager.c | 2 | ||||
| -rw-r--r-- | src/devices/adsl/nm-device-adsl.c | 50 |
3 files changed, 72 insertions, 14 deletions
diff --git a/src/devices/adsl/meson.build b/src/devices/adsl/meson.build new file mode 100644 index 00000000..ee804d23 --- /dev/null +++ b/src/devices/adsl/meson.build @@ -0,0 +1,34 @@ +sources = files( + 'nm-atm-manager.c', + 'nm-device-adsl.c' +) + +deps = [ + libudev_dep, + nm_dep +] + +libnm_device_plugin_adsl = shared_module( + 'nm-device-plugin-adsl', + sources: sources, + dependencies: deps, + link_args: ldflags_linker_script_devices, + link_depends: linker_script_devices, + install: true, + install_dir: nm_plugindir +) + +core_plugins += libnm_device_plugin_adsl + +run_target( + 'check-local-devices-adsl', + command: [check_exports, libnm_device_plugin_adsl.full_path(), linker_script_devices], + depends: libnm_device_plugin_adsl +) + +# FIXME: check_so_symbols replacement +''' +check-local-devices-adsl: src/devices/adsl/libnm-device-plugin-adsl.la + $(srcdir)/tools/check-exports.sh $(builddir)/src/devices/adsl/.libs/libnm-device-plugin-adsl.so "$(srcdir)/linker-script-devices.ver" + $(call check_so_symbols,$(builddir)/src/devices/adsl/.libs/libnm-device-plugin-adsl.so) +''' diff --git a/src/devices/adsl/nm-atm-manager.c b/src/devices/adsl/nm-atm-manager.c index 32c4c386..0ff4603d 100644 --- a/src/devices/adsl/nm-atm-manager.c +++ b/src/devices/adsl/nm-atm-manager.c @@ -236,7 +236,7 @@ handle_uevent (NMUdevClient *client, ifindex = udev_device_get_property_value (device, "IFINDEX"); seqnum = udev_device_get_seqnum (device); nm_log_dbg (LOGD_PLATFORM, "UDEV event: action '%s' subsys '%s' device '%s' (%s); seqnum=%" G_GUINT64_FORMAT, - action, subsys, udev_device_get_sysname (device), ifindex ? ifindex : "unknown", seqnum); + action, subsys, udev_device_get_sysname (device), ifindex ?: "unknown", seqnum); if (!strcmp (action, "add")) adsl_add (self, device); diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index e9bd41ae..1450a836 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -39,8 +39,6 @@ #include "nm-setting-adsl.h" #include "nm-utils.h" -#include "introspection/org.freedesktop.NetworkManager.Device.Adsl.h" - #include "devices/nm-device-logging.h" _LOG_DECLARE_SELF (NMDeviceAdsl); @@ -116,7 +114,7 @@ static gboolean complete_connection (NMDevice *device, NMConnection *connection, const char *specific_object, - const GSList *existing_connections, + NMConnection *const*existing_connections, GError **error) { NMSettingAdsl *s_adsl; @@ -137,8 +135,6 @@ complete_connection (NMDevice *device, _("ADSL connection"), NULL, FALSE); /* No IPv6 yet by default */ - - return TRUE; } @@ -198,7 +194,7 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) _LOGD (LOGD_ADSL, "assigning address %d.%d.%d encapsulation %s", priv->atm_index, addr.sap_addr.vpi, addr.sap_addr.vci, - encapsulation ? encapsulation : "(none)"); + encapsulation ?: "(none)"); err = connect (priv->brfd, (struct sockaddr*) &addr, sizeof (addr)); if (err != 0) { @@ -431,8 +427,22 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_ } static void +ppp_ifindex_set (NMPPPManager *ppp_manager, + int ifindex, + const char *iface, + gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + + if (!nm_device_set_ip_ifindex (device, ifindex)) { + nm_device_state_changed (device, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + } +} + +static void ppp_ip4_config (NMPPPManager *ppp_manager, - const char *iface, NMIP4Config *config, gpointer user_data) { @@ -440,7 +450,6 @@ ppp_ip4_config (NMPPPManager *ppp_manager, /* Ignore PPP IP4 events that come in after initial configuration */ if (nm_device_activate_ip4_state_in_conf (device)) { - nm_device_set_ip_iface (device, iface); nm_device_activate_schedule_ip4_config_result (device, config); } } @@ -499,6 +508,9 @@ act_stage3_ip4_config_start (NMDevice *device, g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_STATE_CHANGED, G_CALLBACK (ppp_state_changed), self); + g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IFINDEX_SET, + G_CALLBACK (ppp_ifindex_set), + self); g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IP4_CONFIG, G_CALLBACK (ppp_ip4_config), self); @@ -513,7 +525,7 @@ adsl_cleanup (NMDeviceAdsl *self) if (priv->ppp_manager) { g_signal_handlers_disconnect_by_func (priv->ppp_manager, G_CALLBACK (ppp_state_changed), self); g_signal_handlers_disconnect_by_func (priv->ppp_manager, G_CALLBACK (ppp_ip4_config), self); - nm_ppp_manager_stop_sync (priv->ppp_manager); + nm_ppp_manager_stop (priv->ppp_manager, NULL, NULL); g_clear_object (&priv->ppp_manager); } @@ -639,10 +651,24 @@ dispose (GObject *object) G_OBJECT_CLASS (nm_device_adsl_parent_class)->dispose (object); } +static const NMDBusInterfaceInfoExtended interface_info_device_adsl = { + .parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT ( + NM_DBUS_INTERFACE_DEVICE_ADSL, + .signals = NM_DEFINE_GDBUS_SIGNAL_INFOS ( + &nm_signal_info_property_changed_legacy, + ), + .properties = NM_DEFINE_GDBUS_PROPERTY_INFOS ( + NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Carrier", "b", NM_DEVICE_CARRIER), + ), + ), + .legacy_property_changed = TRUE, +}; + static void nm_device_adsl_class_init (NMDeviceAdslClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (klass); NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass); object_class->constructed = constructed; @@ -650,6 +676,8 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) object_class->get_property = get_property; object_class->set_property = set_property; + dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_adsl); + parent_class->get_generic_capabilities = get_generic_capabilities; parent_class->check_connection_compatible = check_connection_compatible; @@ -666,8 +694,4 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); - - nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - NMDBUS_TYPE_DEVICE_ADSL_SKELETON, - NULL); } |