summaryrefslogtreecommitdiff
path: root/src/devices/nm-device-ethernet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/nm-device-ethernet.c')
-rw-r--r--src/devices/nm-device-ethernet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index d27f7dcaf1..1367555b3e 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -21,6 +21,8 @@
#include "nm-default.h"
+#include "nm-device-ethernet.h"
+
#include <netinet/in.h>
#include <string.h>
#include <stdlib.h>
@@ -29,7 +31,6 @@
#include <gudev/gudev.h>
-#include "nm-device-ethernet.h"
#include "nm-device-private.h"
#include "nm-activation-request.h"
#include "NetworkManagerUtils.h"
@@ -44,7 +45,7 @@
#include "nm-settings-connection.h"
#include "nm-config.h"
#include "nm-device-ethernet-utils.h"
-#include "nm-connection-provider.h"
+#include "nm-settings.h"
#include "nm-device-factory.h"
#include "nm-core-internal.h"
#include "NetworkManagerUtils.h"
@@ -1435,7 +1436,7 @@ static NMConnection *
new_default_connection (NMDevice *self)
{
NMConnection *connection;
- const GSList *connections;
+ NMSettingsConnection *const*connections;
NMSetting *setting;
const char *hw_address;
gs_free char *defname = NULL;
@@ -1453,8 +1454,8 @@ new_default_connection (NMDevice *self)
setting = nm_setting_connection_new ();
nm_connection_add_setting (connection, setting);
- connections = nm_connection_provider_get_connections (nm_connection_provider_get ());
- defname = nm_device_ethernet_utils_get_default_wired_name (connections);
+ connections = nm_settings_get_connections (nm_device_get_settings (self), NULL);
+ defname = nm_device_ethernet_utils_get_default_wired_name ((NMConnection *const*) connections);
if (!defname)
return NULL;
@@ -1581,7 +1582,6 @@ link_changed (NMDevice *device, NMPlatformLink *info)
{
NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- static const guint8 zero_hwaddr[ETH_ALEN];
const guint8 *hwaddr;
gsize hwaddrlen = 0;
@@ -1593,7 +1593,7 @@ link_changed (NMDevice *device, NMPlatformLink *info)
hwaddr = nm_platform_link_get_address (NM_PLATFORM_GET,
nm_device_get_ifindex (self),
&hwaddrlen);
- if (!nm_utils_hwaddr_matches (hwaddr, hwaddrlen, zero_hwaddr, ETH_ALEN)) {
+ if (!nm_utils_hwaddr_matches (hwaddr, hwaddrlen, nm_ip_addr_zero.addr_eth, sizeof (nm_ip_addr_zero.addr_eth))) {
_LOGD (LOGD_DEVICE, "device got a valid hw address");
nm_device_update_hw_address (self);
nm_device_update_initial_hw_address (self);