summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/inet.c b/src/inet.c
index e0ef7dbb..48145461 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -451,8 +451,15 @@ void connman_inet_update_device_ident(struct connman_device *device)
case CONNMAN_DEVICE_TYPE_ETHERNET:
case CONNMAN_DEVICE_TYPE_GADGET:
case CONNMAN_DEVICE_TYPE_WIFI:
- addr = index2addr(index);
- ident = index2ident(index, NULL);
+ if (type == CONNMAN_DEVICE_TYPE_WIFI)
+ addr = _get_wifi_addr();
+ if (!addr)
+ addr = index2addr(index);
+
+ if (type == CONNMAN_DEVICE_TYPE_WIFI)
+ ident = _get_wifi_ident();
+ if (!ident)
+ ident = index2ident(index, NULL);
break;
case CONNMAN_DEVICE_TYPE_CELLULAR:
ident = index2ident(index, NULL);