summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--introspection/org.freedesktop.NetworkManager.Device.xml2
-rw-r--r--src/devices/nm-device.c33
3 files changed, 4 insertions, 33 deletions
diff --git a/NEWS b/NEWS
index a9a0ea12f9..4b00eeba53 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,8 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
setting and runtime detection.
"resolvconf" and "netconfig" are only considered iff NetworkManager
was built with the respective options enabled.
+* The long deprecated D-Bus property "Ip4Address" on "org.freedesktop.NetworkManager.Device"
+ interface is not defunct and always returns zero.
=============================================
NetworkManager-1.26
diff --git a/introspection/org.freedesktop.NetworkManager.Device.xml b/introspection/org.freedesktop.NetworkManager.Device.xml
index f1ab3db53b..adcdaec163 100644
--- a/introspection/org.freedesktop.NetworkManager.Device.xml
+++ b/introspection/org.freedesktop.NetworkManager.Device.xml
@@ -100,7 +100,7 @@
Ip4Address:
DEPRECATED; use the 'Addresses' property of the 'Ip4Config' object
- instead.
+ instead. This property always returns 0.0.0.0 (numeric 0) as address.
-->
<property name="Ip4Address" type="u" access="read"/>
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index fefdfcf0e9..5fc6c2a9df 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -377,8 +377,6 @@ typedef struct _NMDevicePrivate {
GCancellable *deactivating_cancellable;
- guint32 ip4_address;
-
NMActRequest * queued_act_request;
bool queued_act_request_is_waiting_for_carrier:1;
NMDBusTrackObjPath act_request;
@@ -12300,24 +12298,6 @@ dnsmasq_cleanup (NMDevice *self)
priv->dnsmasq_manager = NULL;
}
-static void
-_update_ip4_address (NMDevice *self)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- const NMPlatformIP4Address *address;
-
- g_return_if_fail (NM_IS_DEVICE (self));
-
- if ( priv->ip_config_4
- && ip_config_valid (priv->state)
- && (address = nm_ip4_config_get_first_address (priv->ip_config_4))) {
- if (address->address != priv->ip4_address) {
- priv->ip4_address = address->address;
- _notify (self, PROP_IP4_ADDRESS);
- }
- }
-}
-
gboolean
nm_device_is_nm_owned (NMDevice *self)
{
@@ -13749,9 +13729,6 @@ nm_device_set_ip_config (NMDevice *self,
if (has_changes) {
- if (IS_IPv4)
- _update_ip4_address (self);
-
if (old_config != priv->ip_config_x[IS_IPv4])
_notify (self, IS_IPv4 ? PROP_IP4_CONFIG : PROP_IP6_CONFIG);
@@ -14276,8 +14253,6 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware)
/* Can only get HW address of some devices when they are up */
nm_device_update_hw_address (self);
- _update_ip4_address (self);
-
/* when the link comes up, we must restore IP configuration if necessary. */
if (priv->ip_state_4 == NM_DEVICE_IP_STATE_DONE) {
if (!ip_config_merge_and_apply (self, AF_INET, TRUE))
@@ -15999,12 +15974,6 @@ _cleanup_generic_post (NMDevice *self, CleanupType cleanup_type)
act_request_set (self, NULL);
}
- /* Clear legacy IPv4 address property */
- if (priv->ip4_address) {
- priv->ip4_address = 0;
- _notify (self, PROP_IP4_ADDRESS);
- }
-
if (cleanup_type == CLEANUP_TYPE_DECONFIGURE) {
/* Check if the device was deactivated, and if so, delete_link.
* Don't call delete_link synchronously because we are currently
@@ -17818,7 +17787,7 @@ get_property (GObject *object, guint prop_id,
g_value_set_uint (value, (priv->capabilities & ~NM_DEVICE_CAP_INTERNAL_MASK));
break;
case PROP_IP4_ADDRESS:
- g_value_set_uint (value, priv->ip4_address);
+ g_value_set_uint (value, 0);
break;
case PROP_CARRIER:
g_value_set_boolean (value, priv->carrier);