Set interface name for connection objects
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 31 Dec 2008 08:08:50 +0000 (09:08 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 31 Dec 2008 08:08:50 +0000 (09:08 +0100)
plugins/Makefile.am
plugins/ipv4.c

index efcb5b7..e663e14 100644 (file)
@@ -27,7 +27,7 @@ dhclient_la_SOURCES = dhclient.c inet.h inet.c
 dhclient_la_CFLAGS = @GLIB_CFLAGS@ @GDBUS_CFLAGS@ -DDHCLIENT=\"@DHCLIENT@\" \
                -DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
 
-ipv4_la_SOURCES = ipv4.c
+ipv4_la_SOURCES = ipv4.c inet.h inet.c
 
 dnsproxy_la_SOURCES = dnsproxy.c
 
index 33c73a4..5e19cbb 100644 (file)
@@ -397,8 +397,9 @@ static int ipv4_probe(struct connman_element *element)
 
        connection = connman_element_create(NULL);
 
-       connection->type = CONNMAN_ELEMENT_TYPE_CONNECTION;
-       connection->index = element->index;
+       connection->type    = CONNMAN_ELEMENT_TYPE_CONNECTION;
+       connection->index   = element->index;
+       connection->devname = inet_index2name(element->index);
 
        if (connman_element_register(connection, element) < 0)
                connman_element_unref(connection);