summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--device.c2
-rw-r--r--interface-ip.c4
-rw-r--r--interface.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/device.c b/device.c
index bc870c2..0019b6c 100644
--- a/device.c
+++ b/device.c
@@ -242,7 +242,7 @@ void device_set_present(struct device *dev, bool state)
void device_add_user(struct device_user *dep, struct device *dev)
{
dep->dev = dev;
- list_add(&dep->list, &dev->users);
+ list_add_tail(&dep->list, &dev->users);
if (dep->cb && dev->present) {
dep->cb(dep, DEV_EVENT_ADD);
if (dev->active)
diff --git a/interface-ip.c b/interface-ip.c
index 6c673c6..2a26a4a 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -18,7 +18,7 @@ int interface_add_address(struct interface *iface, struct device_addr *addr)
else
family = AF_INET;
- list_add(&addr->list, &iface->address);
+ list_add_tail(&addr->list, &iface->address);
return system_add_address(iface->l3_iface->dev, addr);
}
@@ -49,7 +49,7 @@ void interface_del_ctx_addr(struct interface *iface, void *ctx)
int interface_add_route(struct interface *iface, struct device_route *route)
{
- list_add(&route->list, &iface->routes);
+ list_add_tail(&route->list, &iface->routes);
return system_add_route(iface->l3_iface->dev, route);
}
diff --git a/interface.c b/interface.c
index c437ef3..20956be 100644
--- a/interface.c
+++ b/interface.c
@@ -216,7 +216,7 @@ interface_alloc(const char *name, struct uci_section *s, struct blob_attr *attr)
iface->main_dev.cb = interface_cb;
iface->l3_iface = &iface->main_dev;
strncpy(iface->name, name, sizeof(iface->name) - 1);
- list_add(&iface->list, &interfaces);
+ list_add_tail(&iface->list, &interfaces);
INIT_LIST_HEAD(&iface->errors);
INIT_LIST_HEAD(&iface->address);
INIT_LIST_HEAD(&iface->routes);